-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Intro
Hi!
I am a researcher using mujoco for developing capabilities on manipulation.
My setup
I'm using mjx 0.6.1, in cpu mode, on Ubuntu 24.
What's happening? What did you expect?
When I run the flex bunny.xml in a jitted mjx simulation, the flexvert_xpos
data is completely empty.
If this is unsupported, that is fine, but there is nothing to suggest that it is not supported.
https://mujoco.readthedocs.io/en/stable/mjx.html#
Flex elements are not listed as any of the features that are not supported. In fact, it is even worse: the documentation states that "MJX will raise an exception if asked to copy to device an mjModel with field values referencing unsupported features."
However, you can copy flex elements to and from mjModels without any exceptions. Since flex elements do not seem to be supported in mjx, the bug is that this needs to raise an exception, but does not. Otherwise, like me, you spend time thinking your simulations are succeeding and wondering why you are unable to get any data out of your soft-bodied simulation.
It was only when I searched the flex modeling folder on github that I realized that while the fields are there, there is no logic supported for flex elements in mjx: https://github.com/search?q=repo%3Agoogle-deepmind%2Fmujoco+flex+language%3APython&type=code&l=Python
(Incidentally, it would be great if the documentation can be updated to describe if flex elements are coming soon or unsupported.)
Steps for reproduction
- Load the bunny.xml.
- Convert it to an mjx model.
- jit the simulation function.
- Run the simulation.
- Try to extract flexvert_xpos - it will be all 0s. And the initial mjx_data struct will be empty.
Minimal model for reproduction
No response
Code required for reproduction
No response
Confirmations
- I searched the latest documentation thoroughly before posting.
- I searched previous Issues and Discussions, I am certain this has not been raised before.