FTH 3 · Whole body|INEMA.CLUB-PRO

Lesson 1 · 15 min

From walking to doing: whole-body control

Walking is just the start. To pick up a box, wave, or obey a VLA, the humanoid has to coordinate legs, torso, and arms at the same time, without falling. In this lesson you set up the course workbench and, in a simulation loop, count the three layers that make this happen: who decides, who coordinates the body, and who moves each joint.

Start the lesson
Industrial humanoid robot with a dark visor reaching for a box on a table, held by a loose cable to a gantry.

In this lesson you will

  1. 1The three layers: the VLA (S2 + S1) decides what, the S0 coordinates the body, the PD moves the motor
  2. 2Why each layer runs at a different frequency
  3. 3The 2025–26 paradigm: a policy that tracks human motion
  4. 4The workbench in ~/fth reused from course 0

Goal: set up the bench and name the three layers of a full-body humanoid (VLA, S0 and motor PD) with the frequency of each.

01Who decides, who coordinates, who moves

Click each block.

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

The names S2/S1/S0 follow Figure's Helix 02 (01/27/2026): the VLA is S2 + S1, whole-body control is the S0. The VLA itself is the subject of the vla-v72 course.

02What changed from 2024 to 2026

Click each step.

1. Before

Humanoid control was built from hand-written blocks: a step planner, the foot's trajectory in the air, the support leg, and balance via ZMP or MPC (model predictive control).

It works and it is interpretable, but every new skill needs new engineering. Lesson 6 of FTH course 0 showed the center of mass and the support polygon behind it.

03Set up the workbench (reuses the one from course 0)

If you took course 0, the venv and the Menagerie already exist, and only this course's clone is new. If you didn't, the same block creates everything. The Menagerie is pinned to the tested commit.

Terminal · set up ~/fth
F=${FTH:-$HOME/fth}; mkdir -p $F && cd $F
[ -d .venv ] || python3.12 -m venv .venv
. .venv/bin/activate && pip install -q mujoco==3.16.0 numpy
[ -d corpo-inteiro ] || git clone -q --depth 1 https://github.com/inematds/formacao-fth-corpo-inteiro-v72 corpo-inteiro
[ -d mujoco_menagerie ] || git clone -q --filter=blob:none --sparse https://github.com/google-deepmind/mujoco_menagerie
cd mujoco_menagerie && git sparse-checkout add unitree_g1
git checkout -q 62ab00f && git log -1 --format='menagerie %h (%ad)' --date=short
python3 -c "import mujoco, numpy; print('mujoco', mujoco.__version__, '· numpy', numpy.__version__)"
Example from the repository
menagerie 62ab00f (2026-10-15)
mujoco 3.16.0 · numpy 2.5.4

Two lines and no errors. A different MuJoCo version may change the last digit of the numbers in the next lessons: pin the version.

04Count the layers in a 2-second loop

hierarquia.py runs the G1 standing for 2 s. Every 200 ms (task) it switches the right-hand target; every 20 ms (S0) it redoes the arm IK; every 2 ms it takes one physics step with the motors' PD.

Terminal · the three layers
F=${FTH:-$HOME/fth}; cd $F/corpo-inteiro && . $F/.venv/bin/activate
python3 kit/hierarquia.py; echo "saída: $?"
Excerpt · kit/hierarquia.py
        if i % k2 == 0:  # task (S2+S1 in a VLA): decides "what" (here, a script of targets)
            alvo = alvos[n2 % len(alvos)]
            n2 += 1
        if i % k1 == 0:  # S0: whole-body control, decides "how" the body gets there
Example from the repository
simulado: 2 s · passo de física 2 ms
tarefa (VLA: S2+S1)      :   10 chamadas (5 Hz)
S0 corpo inteiro (IK)    :  100 chamadas (50 Hz)
PD do motor + física     : 1000 passos   (500 Hz)
mão direita a 0.7 cm do último alvo · pelve a 0.79 m · de pé: sim
3 camadas
saída: 0

1000 PD steps for 100 S0 decisions and 10 task decisions. The hand ends less than 1 cm from the last target and the robot is still standing.

05Practice

Workbench, loop and frequencies.

E1 · Workbench ready

10 min

Run the setup block. If you already had ~/fth from course 0, confirm that nothing was reinstalled besides this course's clone.

Done when: cd ~/fth/mujoco_menagerie && git log -1 --format=%h → 62ab00f.

E2 · The three layers

5 min

Run hierarquia.py and note how many times each layer was called.

Done when: python3 kit/hierarquia.py; echo "saída: $?" → 3 camadas and saída: 0, with 1000 passos in the motor PD.

E3 · Faster S0

5 min

Run with the S0 at 100 Hz and compare the hand's final distance to the target with the one at 50 Hz.

Done when: python3 kit/hierarquia.py --wbc-hz 100 | grep S0 → 200 chamadas (100 Hz).

06Lesson quiz

The explanation appears after your answer.

Question 1 of 4

On a full-body humanoid, which layer runs fastest?skill

07In three sentences

Three layersThe VLA (S2 + S1) says what, the S0 coordinates the body, the PD moves the motor.
FrequenciesFrom slow to fast; the upper ones run every N steps of the one below.
2026The S0 became a policy that tracks human motion: that is the rest of the course.

Going further

Next lesson