[BUG FIX] Preserve URDF mimic joint relations when scaling robots. - #3271
[BUG FIX] Preserve URDF mimic joint relations when scaling robots.#3271ktyang512 wants to merge 4 commits into
Conversation
|
Thanks for the review. I removed the batch parameterization, the redundant Regarding the deleted scaling line, The targeted test passes locally on CPU and GPU, and the adjacent CPU tests and Ruff checks also pass. |
3364d03 to
e2608e2
Compare
|
Thanks for the follow-up. I rebased onto the latest main and added the same coordinate-aware scaling to MJCF joint equalities ( The targeted tests pass on CPU and GPU, along with the adjacent rigid constraint and URDF scale tests and Ruff checks. |
Description
Preserve the dimensionally correct URDF mimic relation when loading scaled robots. The follower offset now scales with its coordinate type, while the multiplier scales by the ratio between the follower and driver coordinate scales.
Related Issue
Resolves #3270
Motivation and Context
Uniformly scaling a URDF currently changes common revolute-to-revolute and prismatic-to-prismatic mimic relations, causing the constraint solver to drive scaled mechanisms to unintended joint positions.
How Has This Been / Can This Be Tested?
[[0.5, 4.0], [0.5, 4.0]]for the two same-type cases.n_envs=0andn_envs=2.pre-commitfor all three changed files.CPU targeted and adjacent validation:
uv run pytest -q tests/rigid/test_constraints.py::test_urdf_mimic tests/rigid/test_constraints.py::test_equality_joint 'tests/rigid/test_asset_loading.py::test_robot_scale_and_dofs_armature[urdf/go2/urdf/go2.urdf-cpu]' --backend=cpuGPU targeted validation:
Additional equality and URDF scale regression validation:
Checklist