Skip to content

Reproducing MuJoCo Menagerie hand-to-arm attachment example with the new model editing API #2063

Closed Answered by hartikainen
hartikainen asked this question in Asking for Help
Discussion options

You must be logged in to vote

Just wanted to report back here that this is working as expected from ebe60b9 (not from 3.2.4 that's on PyPI though). Here's a snippet if anyone else is trying to do something similar:

import mujoco
import numpy as np
from robot_descriptions import fr3_mj_description
from robot_descriptions import shadow_dexee_mj_description


def main():
    hand_spec = mujoco.MjSpec.from_file(shadow_dexee_mj_description.MJCF_PATH)
    arm_spec = mujoco.MjSpec.from_file(fr3_mj_description.MJCF_PATH)

    attachment_site = next(s for s in arm_spec.sites if s.name == "attachment_site")
    attachment_site.attach(hand_spec.worldbody, "hand_base", "")

    mj_model = arm_spec.compile()
    mujoco.mj_saveModel(

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hartikainen
Comment options

Comment options

You must be logged in to vote
1 reply
@hartikainen
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by hartikainen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants