Some joints in top level body of MJCF model are skipped when loaded into IsaacGym

When there are multiple joints in the top level body (the one right below ) in the MJCF file, some of them do not seem to be loaded. As a minimal working example:

<mujoco>
  <worldbody>
    <body name="root">
      <joint name="x" type="slide" axis="1 0 0"/>
      <joint name="y" type="slide" axis="0 1 0"/>
      <joint name="z" type="slide" axis="0 0 1"/>
    </body>
  </worldbody>
</mujoco>

If this model file is loaded to Isaac Gym, for example using examples/asset_info.py, the output is

===== Actor: pincher =======================================

Bodies
['', '', 'root']
{'root': 2}

Joints
['z', 'x']
{'x': 1, 'z': 0}

 Degrees Of Freedom (DOFs)
['z', 'x']
{'x': 1, 'z': 0}

Poses from Body State:
[((0., 0., 6.), (-0.7071068, 0., 0., 0.7071068))
 ((0., 0., 6.), (-0.7071068, 0., 0., 0.7071068))
 ((0., 0., 6.), (-0.7071068, 0., 0., 0.7071068))]

Velocities from Body State:
[((0., 0., 0.), (0., 0., 0.)) ((0., 0., 0.), (0., 0., 0.))
 ((0., 0., 0.), (0., 0., 0.))]

Body '' has position (0., 0., 6.)
Body '' has position (0., 0., 6.)
Body 'root' has position (0., 0., 6.)

DOF states:
[(0., 0.) (0., 0.)]

DOF 'z' has position 0.0
DOF 'x' has position 0.0

and it can be seen that the y joint has been skipped / ignored.

In my case I resolved this by introducing another body in between the “root” body and the joint, i.e.

<mujoco>
  <worldbody>
    <body name="root">
      <body name="tmp">
        <joint name="x" type="slide" axis="1 0 0"/>
        <joint name="y" type="slide" axis="0 1 0"/>
        <joint name="z" type="slide" axis="0 0 1"/>
      </body>
    </body>
  </worldbody>
</mujoco>

Though this may be a hack solution that does not get rid of the core problem.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.