google / brax

Massively parallel rigidbody physics simulation on accelerator hardware.
Apache License 2.0
2.33k stars 255 forks source link

`mujoco_convert.py` does not use the default values of MJCF #269

Closed Theo-Cheynel closed 1 year ago

Theo-Cheynel commented 1 year ago

I tried running mujoco_convert.py on a sample MJCF file provided on the dm_control repository (this one, but others have similar issues). I get errors such as "unsupported geom type : None", because the type attribute of the elements is not always defined in the MJCF, since it relies on the defaults defined by MuJoCo in their XML reference. For instance, the documentation seems to indicate that the default value for the attribute "type" is "sphere".

I asked over at dm_control to know whether the parse_xml function worked as intended or if they planned on adding the default values to it, and they said it was the expected behaviour. So I think brax should take those into account after the parse_xml function. What do you think ?

erikfrey commented 1 year ago

We are soon releasing a new API for Brax that has native support for MJCF - leaving this issue open for now until you can try it, but it will support default values in the XML, along with a host of other fixes for MJCF compatability.

Stay tuned!

Theo-Cheynel commented 1 year ago

Thanks ! Can't wait :rocket:

btaba commented 1 year ago

We've posted about the update here: https://github.com/google/brax/releases/tag/v0.1.0

Closing the issue for now, thanks for using brax @Theo-Cheynel !