warp icon indicating copy to clipboard operation
warp copied to clipboard

Importing mjcf

Open robots4us opened this issue 1 year ago • 3 comments

Hi! I am trying to import some robots from the mujoco menagrie. Eg. the shadow hand -> https://github.com/google-deepmind/mujoco_menagerie/blob/main/shadow_hand/right_hand.xml

However, I keep getting errors:

count_contact_points: unsupported geometry type combination 3 and 7 Unsupported geometry pair in collision handling

Can you recommend a quick fix? Thank you for this amazing simulator by the way. :)

robots4us avatar Jun 04 '24 12:06 robots4us

Hi @robots4us,

These geometry type numbers refer to the GEO_... constants, so 3 and 7 refer to GEO_CYLINDER and GEO_PLANE, see model.py.

Since we don't have rigid-body contacts implemented for cylinders yet, I would recommend swapping them out for capsules in the MJCF file for now.

eric-heiden avatar Jun 06 '24 18:06 eric-heiden

That worked. Thanks! :+1:

robots4us avatar Jun 07 '24 08:06 robots4us

On closer inspection, the XML is imported fine, but some joint axes and joint limits are incorrect. In particular, anything that is declared at the beginning of the XML and used later has not been imported correctly. I wrote a script to read the .XML and change the warp.sim.Model. Is there something I might be doing incorrectly or any other workarounds?

robots4us avatar Jun 07 '24 12:06 robots4us