Skip to content

fix(mjcf): sync joint ranges and motor ctrlrange with the urdf - #5

Merged
Luo1imasi merged 1 commit into
Roboparty:mainfrom
dundysm:fix/mjcf-limits-sync
Oct 14, 2026
Merged

Luo1imasi merged 1 commit into
Roboparty:mainfrom
dundysm:fix/mjcf-limits-sync

Conversation

@dundysm

@dundysm dundysm commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

syncs the mjcf limits with urdf/rpo.urdf, as discussed in #4.

what changed:

  • mjcf/rpo.xml, rpo_stairs.xml, rpo_terrain.xml: the 15 joint ranges that differed now match the urdf, and each motor's ctrlrange equals the urdf effort (120 for hips, knees and torso, 27 for ankles and arms) instead of -200 200. nothing else in the files is touched.
  • scripts/check_limits.py: standard library only. it compares every urdf revolute joint against each mjcf range and ctrlrange and exits 1 on drift. run it with python3 scripts/check_limits.py.

verified on cpu:

  • the check fails on main (38 mismatches per file) and passes on this branch.
  • all 3 mjcf files load and step in mujoco 3.x, with 23 actuators each.

the 3 open spots from #4 follow the urdf because that's what training uses. i'm happy to switch any of them if deploy or the cad is the real truth:

  1. thigh_pitch: urdf [-2.094, 0.785] vs deploy and cad [-1.57, 1.57]
  2. thigh_roll: deploy allows 0.6 rad more on the inner side
  3. arm_pitch: cad lower limit is -1.57, urdf and deploy are -3.14

@Luo1imasi @Alexhuge1 could you take a look?

Closes #4

中文摘要:将 3 个 mjcf 文件的关节限位和电机 ctrlrange 与 urdf 同步,并新增仅依赖标准库的一致性检查脚本。

The three MJCF files had 15 joint ranges that differed from
urdf/rpo.urdf, and every motor used ctrlrange -200 200 instead of the
URDF effort (120 or 27). Training uses the URDF, so set the MJCF ranges
and ctrlranges to match it.

Add scripts/check_limits.py, a standard library check that compares
the URDF and MJCF limits and exits nonzero on drift.

Signed-off-by: Dundy Pasupuleti <dundysm@gmail.com>
@Luo1imasi
Luo1imasi merged commit 8e0f8f7 into Roboparty:main Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

urdf and mjcf joint ranges disagree for 15 of 23 joints (and mjcf torque caps)

2 participants