FTH 4 · Operating a real humanoid|INEMA.CLUB-PRO

Lesson 5 · 15 min

When it falls: detect, damp, and get up

Every humanoid under test falls. What separates a prepared lab from a broken robot is what the software does in the first tenths of a second and what the people do afterward. In this lesson the simulated G1 really falls, and your IMU detector sends damping without trying to catch the tumble.

Start the lesson
Humanoid robot lying on its side on a gray rug in a dark lab, limbs relaxed, after a controlled fall.

In this lesson you will

  1. 1Why holding a pose with PD is not balance
  2. 2Tilt with a threshold: too early × too late
  3. 3Damp instead of locking the motors
  4. 4Getting up is a human procedure, after inspection

Goal: detect the G1's fall from the IMU tilt and send damping, without trying to get up on its own.

01From tilt to inspection

Click each step.

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

What the robot does on its own ends at damping. The rest is up to people.

02Three things the fall teaches

Click each one.

1. PD does not balance

In practice, in this lesson, the script holds the starting pose with the gains from the official example. Released from the elastic band, the simulator's G1 falls right after, with no push at all.

Standing up takes balance control: the manufacturer's (high level) or your own policy (courses 1 and 2).

03Release, fall, detect

The simulator holds the G1 on the elastic band with its feet on the ground and releases it at t = 3 s. The queda.py script holds the pose with PD, watches the tilt, and damps once it passes 40°.

Terminal · simulator + detector
F=${FTH:-$HOME/fth}; cd $F/operar && . $F/.venv/bin/activate
python3 kit/sim.py --s 12 --soltar-em 3 &
python3 kit/queda.py; echo "saída: $?"
wait
Excerpt · kit/queda.py
    incl = op.inclinacao(s.imu_state.quaternion)
    incl_max = max(incl_max, incl)
    t = t_ciclo - inicio
    if t10 is None and incl > 10:
        t10 = t
    if caiu is None and incl > a.limite:
        caiu = t
Terminal · the common mistake: threshold too high
F=${FTH:-$HOME/fth}; cd $F/operar && . $F/.venv/bin/activate
python3 kit/sim.py --s 12 --soltar-em 3 > /dev/null &
python3 kit/queda.py --limite 170; echo "saída: $?"
wait
Example from the repository
simulador: G1 29 motores · DDS domínio 1 em lo · 12 s · suspenso: não · elástico solta em t = 3 s
segurando a pose inicial com PD · limiar de queda: 40° de inclinação do tronco
queda detectada: inclinação passou de 40° (≈ 500 ms depois de passar de 10°)
amortecimento enviado: kp=0, kd=2 em todos os motores (sem tentar levantar)
no fim: inclinação acima de 40°: sim · motores amortecidos
saída: 0
simulador: fim em t = 12.0 s · robô no chão

The fall takes about half a second to go from 10° to 40°. The detector acts in the middle of the tumble, and the robot ends up on the floor with the motors damped.

04Practice

Fall on purpose, in the simulator.

E1 · Detect the fall

5 min

Run the detector block and note how long the tumble took from 10° to 40°.

Done when: python3 kit/queda.py; echo "saída: $?" → queda detectada: inclinação passou de 40°, amortecimento enviado and saída: 0.

E2 · The wrong threshold

5 min

Run the common-mistake block and write, in one line, what threshold you would use on your robot and why.

Done when: python3 kit/queda.py --limite 170; echo "saída: $?" → nenhuma queda detectada and saída: 1.

E3 · The post-fall step in the checklist

5 min

In your ~/fth/checklist.yaml, add the chosen threshold and who decides to power back on after a fall to item 8.

Done when: python3 operar/kit/conferir_checklist.py checklist.yaml still shows 12 itens, 0 em branco.

05Lesson quiz

The explanation appears after your answer.

Question 1 of 4

The script held the pose with PD and the G1 fell anyway. Why?skill

06In three sentences

It fallsPD holding a pose does not balance: released, the G1 falls.
DetectsIMU tilt above the threshold → damping.
AfterStop, inspect, record; getting up is for the people.

Going further

Previous lessonNext lesson