Improving Simulation Interoperability and Domain Randomization with MuJoCo and DeepMind

Recently you may have heard that DeepMind released their MuJoCo physics engine under an open source license. As the next step, DeepMind asked Open Robotics to improve the interoperability of MuJoCo physics models with SDFormat physics models commonly used by Gazebo, and a number of other simulators. 

Today we are happy to announce that we have released the sdformat-mjcf library that allows for seamless conversion between the two formats! The software is currently available on PyPI and allows users to convert models / worlds, joints (such as ball, continuous, fixed, prismatic, and revolute joints), sensors (such as altimeters, cameras, force torque sensors, and IMUs) and materials between the two formats. In practical terms this means that users of both MuJoCo and Gazebo are able to quickly and easily toggle between the two simulation environments. This new tooling opens up the entire universe of models available for Gazebo to the MuJoCo user community, and provides MuJoCo users with the capability to use their models in Gazebo. Be aware that this is still a work in progress, and certain features may not be fully supported, to get a list of these features please refer to the project’s documentation.

On our way to building the sdformat-mjcf conversion library, we added Python bindings to SDFormat; meaning SDFormat users now have a programmatic way of creating and  manipulating models! These Python bindings should dramatically simplify the mode creation process and allow developers to automate a lot of common simulation tasks. This feature makes it possible to generate an unlimited number of models and worlds on-the-fly, which is incredibly useful for applications like robot testing, parameter tuning, and domain randomization for deep learning. A full tutorial on using the new SDFormat python bindings can be found here or by visiting SDFormat.org.  

Human model from Mujoco assets converted to SDFormat and visualized in Gazebo.

Like any initial release, there are a few caveats, primarily that this functionality is only available for newer SDF versions and things like nested models, complex kinematic loops, and elements like scene and physics are not yet supported. Subsequent releases will enable the translation between more joint, sensor, and model types and additional simulation features. For a full list of supported features please see the project’s documentation.

This new model conversion capability is currently available for download and is compatible with the latest version of Gazebo, Gazebo Garden. Gazebo Garden is the most recent version of Gazebo, and only released about a month ago in early October. If you would like to give these features a test drive you can download the latest source code following these instructions, and documentation can be found here.

Fostering file-level interoperability between MuJoCo and Gazebo is a first step, and we have ideas for future projects that would improve the developer experience for both MuJoCo and Gazebo users. If you're a MuJoCo and/or Gazebo user, then please let us know what features we should work on next! 



Previous
Previous

Intrinsic Acquires OSRC and OSRC-SG

Next
Next

Open-RMF Capabilities Extended in Collaboration with NCS