Glossary · Physics simulation
MuJoCo
Also called Multi-Joint dynamics with Contact
A fast, accurate physics engine for simulating bodies with joints and contacts, widely used in robotics and reinforcement learning research.
MuJoCo stands for Multi-Joint dynamics with Contact. Emanuel Todorov, Tom Erez and Yuval Tassa built it for robotics and motor control research (Todorov et al. 2012). DeepMind acquired it in 2021 and made it free and open source in 2022.
It’s designed for exactly the kind of problem in this project: articulated bodies (chains of rigid parts connected by joints) touching the world through contacts, simulated fast enough to train reinforcement learning on millions of steps.
What makes it suited to RL
- Speed. It uses generalised coordinates (joint angles rather than free bodies held together by constraints), which makes a humanoid cheap to simulate.
- Stable contacts. Contacts are soft constraints solved by convex optimisation, which stays stable at larger time steps than many engines (see soft contact).
- Everything built in. Actuators, sensors, tendons and muscles are part of the model format.
The model file
Bodies are described in an XML format called MJCF: bodies, joints with their ranges, shapes with their materials (see collision geometry), and actuators. The simulator reads it into a model, and a separate data structure holds the changing state.
In this project
All experiments use MuJoCo 3.16. Both the muscular body and the simple body are MJCF files built by Python scripts from anthropometric data (see anthropometry). The physics runs with a 2 ms timestep. One step costs 161 µs of CPU time for the simple body and 423 µs for the muscular one.