A MuJoCo physics simulation node for the Dora dataflow framework. This node provides real-time physics simulation with support for a wide range of robots from the robot_descriptions package, as well as custom robot models. Designed for modular robotics control architectures.
| Category | Examples |
|---|---|
| Quadrupeds | Unitree Go1/Go2/A1, ANYmal B/C, Boston Dynamics Spot |
| Humanoids | Unitree G1/H1, Apptronik Apollo, TALOS, JVRC-1 |
| Arms | Franka Panda, KUKA iiwa14, Universal Robots UR5e/UR10e |
| Dual Arms | Aloha 2, Baxter, YuMi |
| End Effectors | Allegro Hand, Shadow Hand, Robotiq 2F-85 |
| Drones | Crazyflie 2.0, Skydio X2 |
| Educational | Double Pendulum |
dora build demo.yml
# Start with Unitree Go2 quadruped
dora run demo.yml
# In main.py, modify the model name (line ~95)
model_path_or_name = "franka_panda" # Change this line
# Examples: "go2", "franka_panda", "g1", "spot", etc.
# In main.py, use file path instead of model name
model_path_or_name = "/path/to/my_robot/scene.xml"
TODO
The simulator supports all models from the robot_descriptions package. Common names include:
go1, go2, a1, aliengo, anymal_b, anymal_c, spotg1, h1, apollo, talos, jvrc, cassiepanda, ur5e, ur10e, iiwa14, gen3, sawyerallegro_hand, shadow_hand, leap_hand, robotiq_2f85See robot_models.json for the complete list.
The dora-mujoco node is designed to be robot-agnostic and work with robot-specific controllers:
┌─────────────────┐
│ Command Node │ target_pose/cmd_vel
│ (Gamepad, etc) │─────────────┐
└─────────────────┘ │
▼
┌─────────────────┐ control_input ┌─────────────────┐
│ Robot Controller│───────────────────▶│ dora-mujoco │
│ (Franka, Husky) │ │ │
└─────────────────┘ │ ┌─────────────┐ │ joint_positions
▲ │ │ Simulator │ │──────────────────▶
│ joint_positions │ │ │ │ joint_velocities
└───────────────────────────│ │ ┌────────┐ │ │──────────────────▶
│ │ │Renderer│ │ │ actuator_controls
│ │ └────────┘ │ │──────────────────▶
│ │ │ │ sensor_data
│ └─────────────┘ │──────────────────▶
└─────────────────┘
the control nodes are optional (the robot will still spawn without them)
nodes:
- id: mujoco_sim
build: pip install -e .
path: dora-mujoco
env:
MODEL_NAME: "go2" # Robot model name or file path
inputs:
TICK: dora/timer/millis/2 # Simulation tick rate (500Hz)
outputs:
- joint_positions # Joint position array
- joint_velocities # Joint velocity array
- sensor_data # Sensor readings array
| Input | Type | Description |
|---|---|---|
tick |
Timer | Triggers simulation steps and data output |
control_input |
pa.array(float64) |
Control commands for actuators |
Control Input Format:
[q1, q2, ..., q7, gripper][wheel1, wheel2, wheel3, wheel4][hip1, thigh1, calf1, ...]| Output | Type | Description | Metadata |
|---|---|---|---|
joint_positions |
pa.array(float64) |
Joint positions (qpos) | timestamp |
joint_velocities |
pa.array(float64) |
Joint velocities (qvel) | timestamp |
actuator_controls |
pa.array(float64) |
Current actuator commands | timestamp |
sensor_data |
pa.array(float64) |
Sensor readings (if available) | timestamp |
MODEL_NAME: Robot model name or XML file path (default: "go2")# Use direct XML file path
env:
MODEL_NAME: "/path/to/my_robot/scene.xml"
tick input frequencycontrol_input frequency# Format code
uv run ruff check . --fix
# Lint code
uv run ruff check .
# Run tests
uv pip install pytest
uv run pytest .
To add support for new robot models:
robot_models.json:{
"category_name": {
"my_robot": "my_robot_mj_description"
}
}
robot_descriptions or provide the XML file path directly.Robot-specific controllers should:
joint_positions from the simulationcontrol_input commands to the simulationModel not found:
ERROR: Model file not found for my_robot
robot_models.jsonrobot_descriptions has the model installedScene variant missing:
WARNING: Failed to load scene variant
Control dimension mismatch:
WARNING: Control input size doesn't match actuators
print(model.nu) to see expected control dimensionsViewer issues:
Complete working examples are available in:
dora/examples/mujoco-sim/
This project is released under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please: