Hello everyone,
We are happy to introduce mujoco_ros2_control, a package designed to provide a seamless bridge between the MuJoCo physics engine and the ROS 2 control stack. If you are looking for a bridge between the precision of the MuJoCo physics engine and the flexibility of the ROS 2 control stack, this is for you. This package provides a robust ros2_control system interface that wraps MuJoCo’s simulation environment, allowing you to run standard ROS 2 controllers against simulated robots with the speed and contact stability MuJoCo is famous for.
Feature Highlights & Videos
We have prepared several tutorials in the mujoco_ros2_control_demos package to get you started:
-
Tutorial 1: Basic Robot – Position control of a two-link arm.
-
Tutorial 2: MJCF Generation – Watch the URDF to MJCF conversion tool handle mesh decomposition and sensor injection at runtime.
-
Tutorial 3/4: Advanced Control – Demonstrations of PID tuning for motor actuators and mechanical transmissions.
Key Capabilities:
-
URDF to MuJoCo XML (MJCF): An experimental tool to automate the conversion of URDFs to MJCF, including mesh decomposition and sensor mapping.
-
Comprehensive Sensor Support: Native handling for IMUs, Force-Torque sensors, and RGB-D cameras.
-
Complex Mechanisms: Support for mimic joints, tendons, and mechanical transmissions.
-
Headless Mode: Support unit testing with the simulation on CI/CD
-
High-Speed Simulation: Includes a
sim_speed_factorparameter to run simulations faster than real-time (e.g., 500% speed) while maintaining synchronization. -
Keyframe & State Management: Supports loading specific MuJoCo keyframes or overriding start positions from saved MuJoCo state files.
-
Mimic Joints & Tendons: Specialized handling for robot grippers and complex mechanisms using MuJoCo tendons and equality constraints.
-
Developer Workflows: Pre-configured Pixi for isolated, consistent development on Jazzy.
Acknowledgements
This package was originally developed at NASA Johnson Space Center’s iMETRO facility by Erik Holum, Nathan Dunkelberger, and their team. It has now moved to the ros-controls organization for community maintenance.
A massive thanks to all the contributors involved in the process.
Contributors: Erik Holum, Sai Kishor Kothakota, Nathan Dunkelberger, Christoph Fröhlich, Sergi de las Muelas, Louis LE LAY, Misha Savchenko, Nikki Hart, Paul Gesel, Yassine Cherni, Ortisa and Julia
GitHub: [https://github.com/ros-controls/mujoco_ros2_control]
Robot Simulation Videos: [https://www.youtube.com/watch?v=HEKbP9oxmTs\]
This package will be available on Humble, Jazzy, Kilted, and Rolling distros