E1 · Test with a push
5 minWrite your pass criterion (e.g., 18/20) and only then run the evaluation with a push of 1.0 m/s.
Done when: python3 kit/avaliar.py --episodios 20 --empurrao 1.0; echo "saída: $?" → sobreviveu: 20/20 and saída: 0.
Lesson 7 · 16 min
A policy is only ready when it passes a test you wrote before looking at the result. In this lesson you evaluate the ready-made policy over 20 episodes with fixed seeds: speed error, turning and pushes of 1.0, 1.5 and 2.0 m/s. Then you run your checkpoint from lesson 5 through the same test.
Start the lesson
Goal: evaluate a policy over 20 episodes with fixed seeds, measuring speed error and survival to pushes of increasing strength.
Click each block. avaliar.py runs all four in every episode.
The test is written before the result: number of episodes, command range, strength, and pass criterion (e.g., 18/20).
20 episodes of 10 s, push of 1.0 m/s. Exits 0 when all survive.
F=${FTH:-$HOME/fth}; cd $F/locomocao && . $F/.venv/bin/activate
python3 kit/avaliar.py --episodios 20 --empurrao 1.0; echo "saída: $?"F=${FTH:-$HOME/fth}; cd $F/locomocao && . $F/.venv/bin/activate
for e in 1.5 2.0; do python3 kit/avaliar.py --episodios 20 --empurrao $e | tail -1; donepolítica: unitree_rl_lab velocity v0 (ONNX) · 20 episódios de 10 s · giro +0.0 rad/s · empurrão de 1.0 m/s aos 4 s erro médio de velocidade (quem não caiu): 0.05 m/s sobreviveu: 20/20 saída: 0
20 out of 20 stayed up with a 1.0 m/s push, above the training (up to 0.5 m/s per axis, about 0.71 m/s on the diagonal), with an average velocity error of 0.05 m/s.
sobreviveu: 16/20 sobreviveu: 9/20
At 1.5 m/s, 16 out of 20; at 2.0 m/s, 9 out of 20. The margin runs out between 1.0 and 1.5 m/s. This kind of curve, not a single number, tells you how much the policy can take.
avaliar.py accepts a .pt trained by the kit in place of the ready-made policy. Same seeds.
F=${FTH:-$HOME/fth}; cd $F/locomocao && . $F/.venv/bin/activate
python3 kit/avaliar.py --politica $F/treino/ppo/modelo_20.pt --episodios 5 | tail -2quedas: ep 0 em 1.3 s, ep 1 em 1.4 s, ep 2 em 1.4 s, ep 3 em 1.4 s, ep 4 em 1.3 s sobreviveu: 0/5
0 out of 5, all falls before 1.5 s, even without a push. That is expected for 20 iterations: the test confirms what the curves already said. The value matters less than the habit: every policy, ready-made or yours, goes through the same test.
What this test proves and what is left for course 2.
That the policy tracks the command and withstands pushes in MuJoCo, with the Menagerie G1. The ready-made policy was trained in Isaac Lab: passing here is already a first sign of robustness.
That it walks on the robot. Different delay, actuator, friction, and mass are the subject of course 2, which measures this gap and runs the policy through a sim2sim gate with DDS before it touches the floor.
The concept of evaluating in simulation and of the reality gap, for manipulation policies, is in vla-v72, lesson 6.
Write the criterion before seeing the number.
Write your pass criterion (e.g., 18/20) and only then run the evaluation with a push of 1.0 m/s.
Done when: python3 kit/avaliar.py --episodios 20 --empurrao 1.0; echo "saída: $?" → sobreviveu: 20/20 and saída: 0.
Run 1.5 and 2.0 m/s and write down between which strengths the policy's margin runs out.
Done when: the two lines show sobreviveu: 16/20 and sobreviveu: 9/20; you wrote "between 1.0 and 1.5 m/s".
Run the same test with --giro 0.2 and compare the velocity error with the straight-line one.
Done when: python3 kit/avaliar.py --episodios 20 --giro 0.2 --empurrao 1.0 → the first line shows giro +0.2 rad/s and the last one sobreviveu: 20/20 (on 10/19/2026, error of 0.04 m/s).
The explanation appears after your answer.
Question 1 of 3
Why are the test seeds fixed?skill
Question 2 of 3
20/20 at 1.0 m/s, 16/20 at 1.5, and 9/20 at 2.0. What does this show?
Question 3 of 3
The policy passed 20/20 in MuJoCo. What is still missing before the robot?
Choose an option. The explanation appears after you try.