Declaring (SDF) plugin(s) using MuJoCo's Python API #2768
Replies: 5 comments 14 replies
-
Hi, the plugin sdflib has been removed and the functionality is now supported natively in mujoco. You only need to declare the geom type as sdf. It sounds like you are using the development version of mujoco in python (which has this change) and the 3.3.2 for your XML (which hasn't). |
Beta Was this translation helpful? Give feedback.
-
Happy that your issue was solved. I will close this discussion and feel free to post in #2643 about performance. |
Beta Was this translation helpful? Give feedback.
-
For reference, this issue was solved by updating to the latest commit on the |
Beta Was this translation helpful? Give feedback.
-
Well 3.3.3 and 3.3.4 will never change, they are frozen in time. What crashes are you getting with dev? Can you please open an issue with a minimal example. We will probably release 3.3.5 this week so I would like it not to crash. |
Beta Was this translation helpful? Give feedback.
-
For the python API, is this not helping? https://github.com/google-deepmind/mujoco/blob/main/python/mujoco/specs_test.py#L876 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Intro
Hi!
I am a researcher using MuJoCo to simulate contact dynamics in object manipulation (hollow bodies) with humanoid robots.
My setup
Mujoco 3.3.2, Python, Linux
My question
I'm building a simulation model programmatically through the mjSpec Python interface, and I'm having trouble properly loading the
sdflib
plugin.A minimal model defined as
will lead to a runtime Segmentation Fault on any collision with other free bodies in the simulation.
Looking into the sdf examples, the sdflib plugin would need to be explicitly declared on the model file e.g.
and the corresponding geometry updated to
and, indeed, when manually updating the resulting XML leads to a functional simulation (i.e. working non-convex collisions).
However, I'm unable to replicate this using the Python API: adding the plugin with
will cause an unrecognized plugin 'mujoco.sdf.sdflib' error when exporting the model to XML.
Conversely, attempting to load the plugin library beforehand:
will output plugin 'mujoco.sdf.bolt' is already registered and thus I assume the library is already loaded and the sdflib plugin should be available.
Is this a limitation of the Python bindings, or is there an alternative way to specify the plugins?
Minimal model and/or code that explain my question
No response
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions