E1 · The G1 tree
5 minRun the "list the joints" block and mark the 6 joints of one leg in the output.
Done when: the last line is RESUMO: 29 juntas articuladas + 1 base flutuante · nu=29 · bate com nu: sim and saída: 0.
Lesson 3 · 15 min
"23 to 43 degrees of freedom" is marketing; the joint tree in the file is the body your controller will command. In this lesson you list the G1's 29 joints with limits in degrees and maximum torque, understand why the leg has six, and check that the number matches the actuators.
Start the lesson
Goal: list the G1's joints with limits in degrees and maximum torque, and check that the number of articulated joints matches nu.
Each block is a branch of the tree that starts at the pelvis. Click to see the joints.
12 in the legs + 3 in the waist + 14 in the arms = 29 = nu.
Click each step.
left_hip_roll_joint: left leg, hip, roll rotation (tilting sideways). Pitch bends forward and backward; yaw turns around the vertical axis.
The indentation in the output shows what hangs from what: the ankle depends on the knee, which depends on the hip.
The file stores range="-0.087267 2.8798" in radians; the script converts it: -5° to 165° at the knee.
The hip roll is asymmetric and mirrored: left from -30° to 170°, right from -170° to 30°. The leg opens far outward and only a little inward, where the other leg is.
The joint's actuatorfrcrange attribute caps what the motor can do: 139 N·m at the knee, 88 at the hip pitch, 50 at the ankle, 25 at the shoulder, 5 at the wrist pitch and yaw.
This is the model's limit. Resellers quote 90 N·m (base) and 120 N·m (EDU) for the real G1's knee (reported): one more point where the file and the robot can differ.
The total number of joints (njnt=30) includes the free base. The number that matters to the controller is the number of articulated joints, which must match the number of actuators.
If they don't match, there is a passive joint (with no motor) or a motor outside a joint: both change your controller.
RESUMO: 29 juntas articuladas + 1 base flutuante · nu=29 · bate com nu: sim
juntas.py reads everything from the MJCF and prints one line per joint.
F=${FTH:-$HOME/fth}; cd $F/anatomia && . $F/.venv/bin/activate
python3 kit/juntas.py unitree_g1/scene.xml; echo "saída: $?"unitree_g1/scene.xml · 29 juntas articuladas
junta mín° máx° torque máx (N·m)
left_hip_pitch_joint -145 165 88
left_hip_roll_joint -30 170 139
left_hip_yaw_joint -158 158 88
left_knee_joint -5 165 139
left_ankle_pitch_joint -50 30 50
left_ankle_roll_joint -15 15 50
right_hip_pitch_joint -145 165 88
right_hip_roll_joint -170 30 139
right_hip_yaw_joint -158 158 88
right_knee_joint -5 165 139
right_ankle_pitch_joint -50 30 50
right_ankle_roll_joint -15 15 50
waist_yaw_joint -150 150 88
waist_roll_joint -30 30 50
waist_pitch_joint -30 30 50
left_shoulder_pitch_joint -177 153 25
left_shoulder_roll_joint -91 129 25
left_shoulder_yaw_joint -150 150 25
left_elbow_joint -60 120 25
left_wrist_roll_joint -113 113 25
left_wrist_pitch_joint -93 93 5
left_wrist_yaw_joint -93 93 5
right_shoulder_pitch_joint -177 153 25
right_shoulder_roll_joint -129 91 25
right_shoulder_yaw_joint -150 150 25
right_elbow_joint -60 120 25
right_wrist_roll_joint -113 113 25
right_wrist_pitch_joint -93 93 5
right_wrist_yaw_joint -93 93 5
RESUMO: 29 juntas articuladas + 1 base flutuante · nu=29 · bate com nu: sim
saída: 0abrir.py from lesson 2 prints juntas: 30 (1 base flutuante + 29 articuladas). If you use njnt=30 as the number of motors, you build a command vector with 30 slots and MuJoCo rejects it: ctrl has nu=29. Count only the articulated joints.
Read the tree and draw conclusions from it.
Run the "list the joints" block and mark the 6 joints of one leg in the output.
Done when: the last line is RESUMO: 29 juntas articuladas + 1 base flutuante · nu=29 · bate com nu: sim and saída: 0.
Run the same script on the H1 and compare: how many joints does its leg have, and what is the highest declared torque?
Done when: python3 kit/juntas.py unitree_h1/scene.xml | tail -1 → RESUMO: 19 juntas articuladas + 1 base flutuante · nu=19 · bate com nu: sim.
Find the leg joint with the smallest range of motion on the G1 and explain why it is small.
Done when: python3 kit/juntas.py | grep ankle_roll shows -15 15 on both lines, and you wrote a sentence about why.
The explanation appears after you answer.
Question 1 of 3
The Menagerie G1 has njnt=30 and nu=29. Where does the difference come from?skill
Question 2 of 3
Why does a humanoid's leg usually have 6 joints?
Question 3 of 3
Unitree's spec sheet says 1 waist joint; the Menagerie model has 3. How do you handle that?
Pick an option. The explanation shows up after you answer.