FTH 3 · Whole body|INEMA.CLUB-PRO

Lesson 8 · 15 min

Project: a safe motion, end to end

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
Humanoid robot with a dark visor doing a slow arm motion inside a square marked with yellow tape, under a gantry, with a blurred technician holding a tablet.

In this lesson you will

  1. 1Four safety rules read from the motion itself
  2. 2The four-step chain and the file that ties them all together
  3. 3The most common mistake: checking one motion and sending another
  4. 4Your plan with dates for the next steps

Goal: run the chain mocap → retargeting → motion tracking → safety on a single motion and prove that all four steps pass.

01The chain of a motion

Click each step. Each script writes a summary to ~/fth/movimentos/etapas/.

Click each block of the diagram to see what it does.

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.

02The four safety rules

checar_seguranca.py reads the retargeted motion, frame by frame, on the G1 from Menagerie.

Terminal · check the boxing clip
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: $?"
Example from the repository
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.

03The whole chain on a single motion

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.

Terminal · full chain
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: $?"
Example from the repository
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.

04A batch of motions going through the chain

Datasets like SONIC's have millions of frames: the chain runs as a queue. Run it, interrupt it halfway, and run it again.

a conferir/

na cadeia/

aprovados/

reprovados/

Browser simulation: nothing really runs here. Pass and fail match the kit (10/19/2026): the 1200–2400 segment fails the safety check.

05What you built in this course

Four main deliverables. Click a step to see the "done when".

Lesson 1Layers

S2, S1, S0

3 exercises

Workbench and three-layer loop.

See the lesson
Lessons 2–3Data

BVH → G1

3 exercises

Clip checked and retargeted with no violations.

See the lesson
Lessons 4–6Execution

motion tracking, teleop

3 exercises

Error, latency, and grip measured.

See the lesson
Lessons 7–8Chain

command, safety

3 exercises

Four steps ok in a single motion.

See the lesson
By the end of the courseA human motion brought to the simulated G1 with every step checked.
8 lessons
Tap an exercise to see what to do and the "done when".
  1. 1/5

    Layers

    The workbench in ~/fth and the three layers counted: the base for all the practices.

  2. 2/5

    Data

    Human motion read, with the license considered, and brought to the G1 by GMR in its own environment.

  3. 3/5

    Execution

    Replay with and without the gantry, teleop with latency, and the G1 hand in the model.

  4. 4/5

    Chain

    High-level commands checked and the mocap → safety chain closed.

  5. 5/5

    The whole course

    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.

06Generate your plan with dates

Pick the start date and how much time you have per week. The plan lists the practices for each lesson.

07Practice

Close the chain and adjust the rules.

E1 · Closed chain

10 min

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.

E2 · Your lab's ceiling

5 min

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.

E3 · A clip that fails

15 min

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.

08Lesson quiz

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

09In three sentences

ChainMocap, retargeting, tracking, and safety, always on the same file.
RulesLimit and speed read from the motion; ceilings that are yours, written down.
NextOperating the real robot safely is FTH course 4.

Going further