Knee and wrist don't call for the same motor. In this lesson you see the four actuator types that show up in humanoids and where each one tends to win, learn how the MJCF describes a motor, and measure, by simulation, how much torque the G1's knee produces to hold the robot in a squat.
1QDD, harmonic, planetary and linear: the body map
2position × motor in the MJCF: kp, ctrlrange, forcerange, actuatorfrcrange
3Knee torque from 0° to 90° of squat
4Two paths that have to agree: simulate at rest and mj_inverse
Goal: measure the torque of each joint of the G1 in a squat and compare it with the limit the MJCF declares for it.
01 · Each type wins at a different joint
The industry has not converged on a single actuator, but on a map of the body (humanoid.guide report, reported). Click each type.
Click each block in the diagram to see what it does.
Everything on this map comes from industry and supplier reports: it is a trend, not a specification.
02 · How the MJCF describes a motor
Click each attribute.
1. position
The Menagerie's G1 uses position actuators: you send the target angle in ctrl and MuJoCo applies proportional control with kp=500 and critical damping (dampratio=1).
It's the same scheme as humanoid RL policies: the network sends joint targets and a PD on the robot turns that into torque (course 1 of the program).
2. motor
The Menagerie's H1 uses torque actuators: ctrl is already the torque, from -200 to 200 N·m at the hip and -300 to 300 at the knee.
Without a controller of your own, the H1 collapses in the first second. The G1 stands on its own because the position actuators hold the "stand" pose.
3. ctrlrange
On a position actuator, inheritrange="1" copies the joint's range into the command: the target never leaves the mechanical limit.
With a torque actuator, the command range is the torque range.
4. actuatorfrcrange
On the G1, the torque ceiling lives in the joint (actuatorfrcrange="-139 139" on the knee). Even if the proportional term asks for more, MuJoCo clips it there.
This is the number the script uses to calculate the percentage of the limit.
torque_agachado.py starts from the "stand" pose, bends the knee (hip and ankle bend by half, so the foot stays flat), holds for 2 s, and reads the torque of each joint. Then it checks the largest one with inverse dynamics.
Terminal · knee at 90°
F=${FTH:-$HOME/fth}; cd $F/anatomia && . $F/.venv/bin/activate
python3 kit/torque_agachado.py --joelho 90
Terminal · from 0° to 120°
F=${FTH:-$HOME/fth}; cd $F/anatomia && . $F/.venv/bin/activate
for k in 0 30 60 90 120; do
echo "joelho $k°: $(python3 kit/torque_agachado.py --joelho $k | grep -E '^joelhos|^ATENÇÃO' | tr '\n' ' ')"
done
Example from the repository
joelho dobrado 90° · altura da pelve 0.59 m · 8 contatos com o chão
junta torque (N·m) limite % do limite
left_knee_joint 31 139 22%
right_knee_joint 31 139 22%
left_hip_pitch_joint 2 88 2%
right_hip_pitch_joint 2 88 2%
conferência mj_inverse (left_knee_joint): 31 N·m
joelhos: esquerdo 31 N·m · direito 31 N·m
maior torque: left_knee_joint 31 N·m
31 N·m in each knee, 22% of the model's ceiling. Simulating at rest and mj_inverse give the same value: that is the sign the pose is in equilibrium.
Torque rises almost in a straight line up to 90°. At 120° the robot fell and sat down, and the "torque" reading collapses: a fallen robot's number is not a measurement. That is why the script warns you when the pelvis drops below 0.4 m.
04 · Practice
Measure, sweep, and compare with the real robot.
E1 · Knee at 90°
3 min
Run the "knee at 90°" block and check that both paths (simulation at rest and mj_inverse) agree.
Done when:python3 kit/torque_agachado.py --joelho 90 ends with maior torque: left_knee_joint 31 N·m, with conferência mj_inverse (left_knee_joint): 31 N·m.
E2 · The knee curve
5 min
Run the sweep and write down the knee torque at each angle in a table. At what angle does the robot stop squatting and fall?
Done when: the sweep shows joelho 60°: joelhos: esquerdo 21 N·m · direito 21 N·m and the 120° line shows ATENÇÃO: o robô caiu.
E3 · Model vs. real robot
5 min
Resellers cite a 90 N·m knee peak for the base G1 and 120 N·m for the EDU (reported). Calculate how much the 31 N·m of the squat represents in each case, and say whether there is margin left to jump.
Done when: you wrote down three percentages (22% of the model, about 34% of the base, and 26% of the EDU) and one sentence about margin, noting that the reseller numbers are reported.
05 · Lesson quiz
The explanation appears after you answer.
Question 1 of 4
Why does the Menagerie G1 stand up with no controller of your own, and the H1 does not?skill
Correct
A position actuator with kp=500 is already a controller. On the H1, ctrl is torque: with zero, it collapses. Weight and sensors do not change that.
Not that one
A position actuator with kp=500 is already a controller. On the H1, ctrl is torque: with zero, it collapses. Weight and sensors do not change that.Review: How the MJCF describes a motor
Question 2 of 4
Where does the harmonic reducer usually show up in a humanoid?
Correct
The harmonic drive is compact and precise; repeated shock on a knee is the weak point suppliers cite. That is why the body map places it in the arm.
Not that one
The harmonic drive is compact and precise; repeated shock on a knee is the weak point suppliers cite. That is why the body map places it in the arm.Review: Each type wins at a different joint
Question 3 of 4
Simulating at rest gave 31 N·m at the knee, and so did mj_inverse. What does that agreement show?
Correct
With zero velocity and acceleration, the inverse dynamics torque is what is needed to hold the pose. Matching the simulation shows equilibrium, not fidelity to the real robot.
Not that one
With zero velocity and acceleration, the inverse dynamics torque is what is needed to hold the pose. Matching the simulation shows equilibrium, not fidelity to the real robot.Review: What the knee does when squatting
Question 4 of 4
At 120° the script read 2 N·m at the knee. What should you conclude?
Correct
The pelvis went close to the floor: the robot sat down. Before you use a simulation number, check that the robot is in the situation you wanted to measure.
Not that one
The pelvis went close to the floor: the robot sat down. Before you use a simulation number, check that the robot is in the situation you wanted to measure.Review: What the knee does when squatting
Quiz complete
You got {a} of {n} right. Get them all right and the lesson is marked as complete.
Pick an option. The explanation shows up after you answer.
06 · In three sentences
MapQDD in the legs, harmonic in the arm, planetary in the middle, linear in a big knee.
MJCFposition sends an angle, motor sends a torque; actuatorfrcrange is the ceiling.
MeasurementG1 knee at 90°: 31 N·m, 22 % of the model's ceiling.