fix: MuJoCo 3.x compat — remove convexhull, fix MPL_hand class, fix include paths#1
Merged
Merged
Conversation
…L_hand class Bug 1 (arms_assets.xml): Remove deprecated `convexhull="false"` compiler attribute removed in MuJoCo 3.x. Bug 2 (arms_chain.xml): Fix include paths from `./../../MPL_sim/assets/simpleHand*.xml` to simple relative `simpleHand*.xml`. The old paths assumed a submodule layout where MPL_sim is a sibling directory; the pip package layout has all assets in one directory. Bug 3 (arms_assets.xml + simpleHandR_assets.xml): Define `MPL_hand` default class as a child of `MPL_arm` in arms_assets.xml so it is always available when the combined arms+hands model is loaded. Remove the duplicate top-level `MPL_hand` default from simpleHandR_assets.xml (which caused "unknown default class MPL_hand" when included alongside arms_assets.xml because MuJoCo requires child-class defaults to be nested). Bug 4 (simpleHandL_chain.xml + simpleHandR_chain.xml): No change needed — `childclass="MPL_hand"` on body elements is correct once MPL_hand is properly defined as a nested child default. These bugs are currently worked around at runtime by myosuite's patching layer in myosuite/utils/simhive_assets.py. Once this PR merges and a new mpl_sim release is cut, that patching layer can be removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes four XML bugs in the MPL_sim asset files that cause runtime errors with MuJoCo 3.x. These bugs are currently worked around by myosuite's patching layer in
myosuite/utils/simhive_assets.py; once this PR merges and a new release is cut, that layer can be removed.Bug 1 —
arms_assets.xml: deprecatedconvexhullcompiler attributeMuJoCo 3.x removed the
convexhullcompiler attribute. Removedconvexhull="false"from the<compiler>element.Bug 2 —
arms_chain.xml: broken include pathsLines 37 and 63 used paths like
./../../MPL_sim/assets/simpleHandR_chain.xmlwhich assumed a submodule layout (MPL_sim as a sibling directory). In the pip package, all assets are in the same directory. Fixed to simple relative paths:Bug 3 —
simpleHandR_assets.xml+arms_assets.xml: unknown default classMPL_handWhen
simpleHand*_assets.xmlfiles are included alongsidearms_assets.xml, MuJoCo throwsunknown default class MPL_handbecauseMPL_handwas defined as a top-level default insimpleHandR_assets.xmlrather than as a child ofMPL_arm. MuJoCo requires that child-class defaults be nested under their parent.Fix: moved the
MPL_handdefault as a nested child ofMPL_arminarms_assets.xml, and removed the duplicate top-level definition fromsimpleHandR_assets.xml.Bug 4 —
simpleHandL_chain.xml+simpleHandR_chain.xml:childclass="MPL_hand"No change needed —
childclass="MPL_hand"on body elements is correct now thatMPL_handis properly defined as a nested child default ofMPL_arm.Test plan
arms_chain.xml(combined with assets) in MuJoCo 3.x — no XML errorsmyosuitebimanual env loads cleanly:mujoco.MjModel.from_xml_path(resolved)succeedspytest myosuite/tests/test_tier_a_myochallenge_matrix.py— 19 passed, 0 failed🤖 Generated with Claude Code