Remove dead up-axis conversion from MuJoCo solver#1707
Remove dead up-axis conversion from MuJoCo solver#1707adenzler-nvidia wants to merge 1 commit intonewton-physics:mainfrom
Conversation
The MuJoCo solver spec is built entirely in Newton's native coordinate system — body transforms, joint frames, and gravity are all passed through without any axis conversion. The up_axis swizzle in update_body_mass_ipos_kernel was a leftover that incorrectly converted the COM position to Z-up while everything else remained in Newton coordinates. Remove the up_axis parameter from the kernel and the corresponding test expectations that matched this incorrect behavior.
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThis PR removes the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I'm not very confident on this one because I don't really remember the full up-axis story. But the code looked inconsistent at least, because we were only rotating ipos. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
update_body_mass_ipos_kernelbody_iposin a different coordinate system from everything elseshape_bodiesvariableCloses #229 — the scattered
pos2mjc/rot_y2zconversions referenced in the issue have all been removed. The remainingup_axisusage across the codebase (importers, geometry SDF kernels, viewer, mesh utils) properly handles all 3 axes (X, Y, Z).Test plan
uv run --extra dev -m newton.tests --no-cache-clear -k test_mujoco_solver)Summary by CodeRabbit
Refactor
Tests