mujoco_sim is a MuJoCo simulation and ROS 2 integration repository.
It contains:
mujoco_core: MuJoCo runtime and plant access layermujoco_viewer: interactive MuJoCo viewer and standalone viewer executablemujoco_models: public MJCF models and assets used by the standalone examplesmujoco_ros2_driver:ros2_controlhardware plugin for MuJoCo-backed simulation
This repo is structured as an ament_cmake / colcon workspace and builds through pixi.
mujoco_sim is the public MuJoCo simulation stack.
It is responsible for:
- loading MuJoCo models
- owning
mjModel/mjData - stepping and resetting simulation
- actuator command application
- tracked-frame and force/torque sensor extraction
- standalone visualization
- packaging public example models
- exposing a ROS 2 hardware plugin for higher-level control integration
It is not responsible for:
- robot-specific private assets
Private robot descriptions, deployment assets, and private bringup remain in downstream/private repos.
This repo is set up to build with pixi.
Minimal environment dependencies:
mujococmakeninjapkg-configcolcon-common-extensionsglfwyaml-cppopencvgtestros-humble-ament-cmakeros-humble-hardware-interfaceros-humble-pluginlibros-humble-rclcppros-humble-rclcpp-lifecycle
pixi run buildClean and rebuild:
pixi run rebuildRun tests:
pixi run testPendulum example:
pixi run sim_viewer_pendulummujoco_core/
mujoco_viewer/
mujoco_models/
mujoco_ros2_driver/
- MuJoCo is resolved from
MUJOCO_PATHorCONDA_PREFIX - public example configs are installed under:
share/mujoco_core/config
- public model assets are installed under:
share/mujoco_models