E1 · Closed chain
10 minRun the full chain on the boxing motion. Before running it, on a fresh bench, the check shows the steps that are missing.
Done when: python3 kit/conferir_pipeline.py; echo "saída: $?" → 4 etapas ok and saída: 0.
Lesson 8 · 15 min
Each lesson left you one piece: clip read, retargeting with no violations, motion tracking measured, safety check. What goes to a robot is the whole chain, in a single movement. In this lesson you run the four steps in sequence, check that they all pass and refer to the same file, and generate your own study plan.
Start the lesson
Goal: run the chain mocap → retargeting → motion tracking → safety on a single motion and prove that all four steps pass.
Click each step. Each script writes a summary to ~/fth/movimentos/etapas/.
The chain only holds if steps 2, 3, and 4 talk about the same file and step 2 comes from the BVH in step 1.
checar_seguranca.py reads the retargeted motion, frame by frame, on the G1 from Menagerie.
F=${FTH:-$HOME/fth}; cd $F/corpo-inteiro && . $F/.venv/bin/activate
python3 kit/checar_seguranca.py $F/movimentos/boxe_g1.npz; echo "saída: $?"ok · limites de junta: 0 quadro×junta fora ok · velocidade de junta: máx 313°/s em left_elbow_joint (teto 400°/s) ok · pé não afunda no chão: site do pé desce até 3.8 cm (de pé: 3.3 cm) ok · área de trabalho: pelve se afasta até 0.22 m (raio 1.5 m) segurança: 4/4 regras saída: 0
The left elbow reaches 313°/s in a punch. With a cap of 150°/s (for example, for the first test near people), the same rule fails the movement: --teto-graus-s 150 gives segurança: 3/4 regras.
segurança: 3/4 regras
With the cap for the first test near people, the boxing movement fails on speed.
Runs the four steps in sequence on the same clip and checks. Each line shows the result of one step; the check says whether the chain closes.
F=${FTH:-$HOME/fth}; cd $F/corpo-inteiro; B=$F/GMR/assets/xsens_bvh_test/251021_04_boxing_120Hz_cm_3DsMax.bvh
. $F/.venv/bin/activate && python3 kit/ler_clipe.py $B | tail -1
( . $F/.venv-gmr/bin/activate && python3 kit/retarget.py $B --fim 1200 --nome boxe_g1 | grep violações )
python3 kit/reproduzir.py $F/movimentos/boxe_g1.npz | grep "erro médio"
python3 kit/checar_seguranca.py $F/movimentos/boxe_g1.npz | tail -1
python3 kit/conferir_pipeline.py; echo "saída: $?"linhas de movimento conferidas: 4249/4249 violações de limite (Menagerie, folga 0.5°): 0 erro médio de junta: 0.3° · pior junta: right_shoulder_roll_joint (1.9°) segurança: 4/4 regras ok · mocap (BVH lido): 4249 quadros a 120 Hz ok · retargeting: 1200 quadros, 0 violações de limite ok · rastreio no simulador: erro médio 0.3° (máx 2°), queda: não ok · checagem de segurança: 4/4 regras cadeia: um só movimento (boxe_g1.npz) 4 etapas ok saída: 0
Four steps ok and a single motion from start to finish.
segurança: 4/4 regras violações de limite (Menagerie, folga 0.5°): 0 erro médio de junta: 0.3° · pior junta: right_shoulder_roll_joint (2.7°) ok · mocap (BVH lido): 4249 quadros a 120 Hz ok · retargeting: 600 quadros, 0 violações de limite ok · rastreio no simulador: erro médio 0.3° (máx 2°), queda: não ok · checagem de segurança: 4/4 regras FALHA · cadeia: as etapas falam de arquivos diferentes (boxe_curto.npz, boxe_g1.npz) 3 de 4 etapas ok saída: 1
After the chain closed, someone redid the retargeting (now with 600 frames) and the tracking, but not the safety check. Each step passes on its own; the chain does not: safety was checked on one file and the one that would go to the robot is another.
violações de limite (Menagerie, folga 0.5°): 0 erro médio de junta: 1.5° · pior junta: right_ankle_pitch_joint (5.1°) ok · limites de junta: 0 quadro×junta fora FALHA · velocidade de junta: máx 635°/s em left_knee_joint (teto 400°/s) FALHA · pé não afunda no chão: site do pé desce até 1.4 cm (de pé: 3.3 cm) ok · área de trabalho: pelve se afasta até 0.05 m (raio 1.5 m) segurança: 2/4 regras cadeia: um só movimento (boxe_trecho2.npz) 3 de 4 etapas ok
Frames 1200 to 2400 pass retargeting and motion tracking, but the knee reaches 635°/s and the foot drops 1.9 cm below the standing pose (retargeting does not enforce ground contact). The chain closes on a single file and fails: that is the right result.
Datasets like SONIC's have millions of frames: the chain runs as a queue. Run it, interrupt it halfway, and run it again.
Browser simulation: nothing really runs here. Pass and fail match the kit (10/19/2026): the 1200–2400 segment fails the safety check.
Four main deliverables. Click a step to see the "done when".
motion tracking, teleop
3 exercises
Error, latency, and grip measured.
See the lessonThe workbench in ~/fth and the three layers counted: the base for all the practices.
Human motion read, with the license considered, and brought to the G1 by GMR in its own environment.
Replay with and without the gantry, teleop with latency, and the G1 hand in the model.
High-level commands checked and the mocap → safety chain closed.
Four deliverables in sequence. The next step is operating a real robot safely: FTH course 4.
Order matters: without the retargeting checked, tracking and safety measure the wrong motion.
Pick the start date and how much time you have per week. The plan lists the practices for each lesson.
Close the chain and adjust the rules.
Run the full chain on the boxing motion. Before running it, on a fresh bench, the check shows the steps that are missing.
Done when: python3 kit/conferir_pipeline.py; echo "saída: $?" → 4 etapas ok and saída: 0.
Run the check with the 150°/s ceiling and write in one sentence which part of the boxing motion went over the ceiling.
Done when: python3 kit/checar_seguranca.py ~/fth/movimentos/boxe_g1.npz --teto-graus-s 150 | tail -1 → segurança: 3/4 regras.
Take the clip from frame 1200 to 2400 through the whole chain (retarget, play back, and check with the same file) and write which rules it breaks and why.
Done when: python3 kit/conferir_pipeline.py | tail -2 → cadeia: um só movimento (boxe_trecho2.npz) and 3 de 4 etapas ok.
The explanation appears after your answer.
Question 1 of 3
Each step passed on its own, but the check says "cadeia quebrada". What happened?skill
Question 2 of 3
Where does the 400°/s ceiling in the speed rule come from?
Question 3 of 3
Why does this course's tracking criterion use the gantry, while a real project's shouldn't?
Choose an option. The explanation appears after you try.