G1 29DOF 关节顺序说明
背景
在isaaclab训练完后,拿到policy文件放入mujoco中进行仿真,发现一顿抽搐和乱甩,基本是关节顺序不对导致,随后核对了一波关节顺序对应关系。
Isaac Lab 训练时,PhysX 按 actuator 分组 对关节重新排序,形成"内部顺序"(internal order)。
deploy.yaml 中的 joint_ids_map[internal_idx] = sdk_idx,将内部顺序映射到 SDK/MuJoCo 顺序。
default_joint_pos、policy 输入输出均以内部顺序排列。
注意 :MuJoCo XML (
scene_29dof.xml) 的关节顺序与 SDK 顺序完全一致,因此 MuJoCo index = SDK index。
![]() |
![]() |
|---|---|
| Isaaclab示意图 | MuJoCo效果 |
Isaac Lab 内部顺序(Policy 输入/输出顺序)
| 内部顺序 | 缩写 | 关节全名 | 中文名 | MuJoCo / SDK index | 默认角度 (rad) |
|---|---|---|---|---|---|
| 0 | lhp | left_hip_pitch_joint | 左髋俯仰 | 0 | -0.10 |
| 1 | rhp | right_hip_pitch_joint | 右髋俯仰 | 6 | -0.10 |
| 2 | wy | waist_yaw_joint | 腰偏航 | 12 | 0.00 |
| 3 | lhr | left_hip_roll_joint | 左髋侧滚 | 1 | 0.00 |
| 4 | rhr | right_hip_roll_joint | 右髋侧滚 | 7 | 0.00 |
| 5 | wr | waist_roll_joint | 腰侧滚 | 13 | 0.00 |
| 6 | lhy | left_hip_yaw_joint | 左髋偏航 | 2 | 0.00 |
| 7 | rhy | right_hip_yaw_joint | 右髋偏航 | 8 | 0.00 |
| 8 | wp | waist_pitch_joint | 腰俯仰 | 14 | 0.00 |
| 9 | lk | left_knee_joint | 左膝 | 3 | 0.30 |
| 10 | rk | right_knee_joint | 右膝 | 9 | 0.30 |
| 11 | lsp | left_shoulder_pitch_joint | 左肩俯仰 | 15 | 0.30 |
| 12 | rsp | right_shoulder_pitch_joint | 右肩俯仰 | 22 | 0.30 |
| 13 | lap | left_ankle_pitch_joint | 左踝俯仰 | 4 | -0.20 |
| 14 | rap | right_ankle_pitch_joint | 右踝俯仰 | 10 | -0.20 |
| 15 | lsr | left_shoulder_roll_joint | 左肩侧滚 | 16 | 0.25 |
| 16 | rsr | right_shoulder_roll_joint | 右肩侧滚 | 23 | -0.25 |
| 17 | lar | left_ankle_roll_joint | 左踝侧滚 | 5 | 0.00 |
| 18 | rar | right_ankle_roll_joint | 右踝侧滚 | 11 | 0.00 |
| 19 | lsy | left_shoulder_yaw_joint | 左肩偏航 | 17 | 0.00 |
| 20 | rsy | right_shoulder_yaw_joint | 右肩偏航 | 24 | 0.00 |
| 21 | le | left_elbow_joint | 左肘 | 18 | 0.97 |
| 22 | re | right_elbow_joint | 右肘 | 25 | 0.97 |
| 23 | lwroll | left_wrist_roll_joint | 左腕侧滚 | 19 | 0.15 |
| 24 | rwroll | right_wrist_roll_joint | 右腕侧滚 | 26 | -0.15 |
| 25 | lwpitch | left_wrist_pitch_joint | 左腕俯仰 | 20 | 0.00 |
| 26 | rwpitch | right_wrist_pitch_joint | 右腕俯仰 | 27 | 0.00 |
| 27 | lwyaw | left_wrist_yaw_joint | 左腕偏航 | 21 | 0.00 |
| 28 | rwyaw | right_wrist_yaw_joint | 右腕偏航 | 28 | 0.00 |
MuJoCo / SDK 顺序(硬件电机顺序)
| Index | 关节全名 |
|---|---|
| 0 | left_hip_pitch_joint |
| 1 | left_hip_roll_joint |
| 2 | left_hip_yaw_joint |
| 3 | left_knee_joint |
| 4 | left_ankle_pitch_joint |
| 5 | left_ankle_roll_joint |
| 6 | right_hip_pitch_joint |
| 7 | right_hip_roll_joint |
| 8 | right_hip_yaw_joint |
| 9 | right_knee_joint |
| 10 | right_ankle_pitch_joint |
| 11 | right_ankle_roll_joint |
| 12 | waist_yaw_joint |
| 13 | waist_roll_joint |
| 14 | waist_pitch_joint |
| 15 | left_shoulder_pitch_joint |
| 16 | left_shoulder_roll_joint |
| 17 | left_shoulder_yaw_joint |
| 18 | left_elbow_joint |
| 19 | left_wrist_roll_joint |
| 20 | left_wrist_pitch_joint |
| 21 | left_wrist_yaw_joint |
| 22 | right_shoulder_pitch_joint |
| 23 | right_shoulder_roll_joint |
| 24 | right_shoulder_yaw_joint |
| 25 | right_elbow_joint |
| 26 | right_wrist_roll_joint |
| 27 | right_wrist_pitch_joint |
| 28 | right_wrist_yaw_joint |
joint_mapping(configs/g1_29dof.yaml)
joint_mapping[internal_idx] = mujoco_idx
[0, 6, 12, 1, 7, 13, 2, 8, 14, 3, 9, 15, 22, 4, 10, 16, 23, 5, 11, 17, 24, 18, 25, 19, 26, 20, 27, 21, 28]
PhysX Actuator 分组
| Actuator 型号 | 覆盖关节 | kp | kd |
|---|---|---|---|
| N7520-14.3 | hip_pitch × 2, hip_yaw × 2, waist_yaw | 100 / 200 | 2 / 5 |
| N7520-22.5 | hip_roll × 2, knee × 2 | 100 / 150 | 2 / 4 |
| N5020-16 | shoulder × 6, elbow × 2, wrist_roll × 2, ankle × 4, waist_roll, waist_pitch | 40 | 1 / 2 / 5 |
| W4010-25 | wrist_pitch × 2, wrist_yaw × 2 | 40 | 1 |

