MuJoCo: Fast Contact-Dynamics Simulation for Robotics Research
A contact-dynamics engine for robotics research, with a C API, Python bindings, and a JAX-based MJX branch.
GitHub google-deepmind/mujoco Updated 2026-11-09 Branch main Stars 16.4K Forks 2.0K
C++ Python Robotics Simulation MJX JAX C API Linux/Windows/macOS

🧭 Decision Guide

Try it if you

  • You need to simulate robots or other articulated structures interacting with environments and want to use the C API or Python bindings
    The README's MuJoCo section describes articulated structures interacting with their environment and provides a C API and Python bindings
  • You are working on JAX, controllers, or differentiable-physics experiments and need MJX, LQR, or differentiable-physics examples
    The README's Getting Started section lists MJX, LQR, and differentiable-physics tutorials
  • Your target environment is Linux, Windows, or macOS and you want prebuilt release packages
    The README's Installation > Prebuilt binaries section lists Linux x86-64/AArch64, Windows x86-64, and macOS universal

Skip it if you

  • You must use an officially supported Google product
    The README's License and Disclaimer section explicitly states: “This is not an officially supported Google product.”
  • You plan to depend on the stability of tip commits from the main branch
    The README's Installation > Building from source section says the tip commit of main may be unstable
  • Your Python environment is below 3.11 and cannot be upgraded
    The README's Installation > Python section requires Python (>= 3.11)

Requirements

  • Python bindings require Python (>= 3.11)
  • Prebuilt Linux wheels target manylinux2014-compatible distributions
  • Prebuilt binaries support Linux x86-64, Linux AArch64, Windows x86-64, and macOS universal
  • Source builds should follow the documentation's build from source section

First step (verbatim from README)

pip install mujoco

Watch out

  • The WebAssembly version of MuJoCo Studio runs slower than native C
    README: Getting Started explicitly says the WebAssembly version is slower than native C
  • Source builds using the tip commit of main may be unstable
    README: Installation > Building from source explicitly warns that the tip commit of main may be unstable
  • Versioning changed to modified Semantic Versioning starting with 3.5.0
    README: Versioning says the versioning standards changed to modified Semantic Versioning in 3.5.0

Alternatives

  • dm_control:It is a better fit when you need Google DeepMind's related environment stack and PyMJCF procedural model manipulation
    README: Related software > Bindings > Python bindings
  • MuJoCo Studio:It is a better fit when you want to drag and drop and inspect MJCF models in a browser without installing software
    README: Getting Started > Try MuJoCo in your browser

Not stated in the README

  • The README does not provide a detailed API-change or compatibility list for MuJoCo 4.0.0 versus older versions
  • The README does not provide performance numbers for different hardware, model sizes, or contact scenarios
  • The README does not specify the complete operator coverage, limitations, or numerical differences between MJX and native MuJoCo
  • The README does not explain the maintenance roles or response times of the 10 contributors

💡 Deep Analysis

6
Yes I want desktop and mobile users to drag and drop their own MJCF models without installing software. Is MuJoCo’s WebAssembly path suitable for this collaboration scenario?
For: A teaching or collaboration developer who needs browser or mobile MJCF inspection but not high-throughput training

Yes, it is suitable for installation-free model inspection, teaching, and collaboration, but not for high-throughput training or strict real-time work in the same browser path because the README explicitly says WebAssembly is slower than native C.

  • The README directs users to mujoco.org to explore MuJoCo on desktop or mobile with nothing to install.
  • live.mujoco.org uses the WebAssembly version of MuJoCo Studio and supports inspecting and dragging in user-owned models.
  • Interactive visualization in web browsers makes model sharing and quick validation practical.
  • The README does not specify browser compatibility, per-model size limits, offline deployment, or performance boundaries on mobile devices.
  • Getting Started: Try MuJoCo in your browser
  • Getting Started: open live.mujoco.org to inspect and drag and drop your own models
  • Getting Started: the WebAssembly version is slower than native C
  • README: interactive visualization in native desktop windows and web browsers
Not stated in the README:Whether the target browsers and mobile devices meet the WebAssembly requirements;Browser limits for model size, textures, and complex contact scenes;Whether private deployment, offline access, or access control is required
Yes I use Python 3.11+, Google Colab, and JAX to train locomotion policies, and I need differentiable physics and batched computation. Is MuJoCo suitable instead of a pure-Python simulator?
For: A machine-learning researcher using Python 3.11+, Google Colab, and JAX to train locomotion policies

Yes, MuJoCo is a good fit because the README provides Python bindings, an MJX/JAX workflow, and a differentiable-physics locomotion example; actual training throughput still depends on model features and accelerator support.

  • The native Python bindings require Python 3.11 or newer and are installable from PyPI.
  • The MJX tutorial demonstrates MuJoCo XLA, providing a path into JAX-based vectorization and accelerated execution.
  • The differentiable-physics tutorial trains locomotion policies with analytical gradients derived from MuJoCo’s physics step.
  • The README only states that WebAssembly is slower than native C; it does not provide performance data for a specific GPU, model size, or operator coverage.
  • Installation: Python (>= 3.11)
  • Getting Started: The MJX tutorial provides usage examples of MuJoCo XLA
  • Getting Started: The differentiable physics tutorial trains locomotion policies with analytical gradients
  • Project insight: MJX, automatic differentiation, and accelerator workflows may be limited by supported features and memory use
pip install mujoco
Not stated in the README:The target GPU or TPU model and its exact MJX support;The training batch size, contact complexity, and required steps per second;Whether every operator used by the model is supported by MJX in the selected version
Yes I train robot policies in Python, need many rollouts, and want to reduce step-by-step Python-loop overhead. Is MuJoCo’s rollout module suitable for my training pipeline?
For: A reinforcement-learning researcher who needs large numbers of robot rollouts in Python and is considering multithreading

Yes, MuJoCo is a suitable candidate for adding multithreaded rollouts to a Python training pipeline because the README provides a dedicated rollout tutorial and explicitly describes the module as multithreaded. Whether it reaches your throughput target still depends on the model and concurrency scale.

  • The Python bindings are installable from PyPI, making direct integration with Python training code straightforward.
  • Getting Started lists a rollout tutorial that demonstrates the multithreaded rollout module.
  • The native runtime uses preallocated low-level data structures and is tuned for performance.
  • The README does not specify a rollout thread limit, steps-per-second results for different models, or benchmarks with a particular reinforcement-learning framework, so final throughput cannot be inferred from the documentation.
  • Installation: pip install mujoco
  • Getting Started: The rollout tutorial shows how to use the multithreaded rollout module
  • README: the runtime simulation module is tuned to maximize performance
  • Project insight: batch training can use multithreaded rollout, native calls, or MJX/JAX vectorization
pip install mujoco
Not stated in the README:The training framework and its threading requirements;The model’s degrees of freedom, contact count, and rollout batch size;The target CPU core count and required steps per second
It depends I already have OpenSim models and want to study joint dynamics, contacts, and control programmatically through Python or the C API. Is migration to MuJoCo feasible?
For: A biomechanics researcher with existing OpenSim human models who needs a programmable dynamics simulator

It depends: the README explicitly provides an OpenSim-to-MJCF conversion path and official Python and C APIs, but whether the migration reproduces your biomechanics experiment depends on which model elements and parameters the converter can express accurately.

  • The Converters section lists MyoConverter and states that it converts OpenSim models to MJCF.
  • MuJoCo names biomechanics as a target area and supports articulated structures interacting with their environment.
  • The C API and Python bindings provide official integration paths for programmable experiments and automation.
  • The README does not document converter coverage, muscle-model mappings, error metrics, or validation results for a particular OpenSim model, so successful conversion alone does not establish biomechanical equivalence.
  • Converters: OpenSim: MyoConverter converts OpenSim models to MJCF
  • README: robotics, biomechanics, graphics and animation
  • README: MuJoCo has a C API
  • Bindings: Python bindings
Not stated in the README:The specific muscles, actuators, and constraints used by the OpenSim model;MyoConverter’s support and conversion error for that model version;The physiological parameters, contact model, and validation data required by the experiment
Yes My main stack is C# and Unity, and I need joint constraints, collisions, and friction for dynamic articulated structures. Is MuJoCo more suitable than an engine focused mainly on graphical presentation?
For: A developer building an animation or game prototype in C# and Unity with joint constraints and contact interactions

Yes, MuJoCo is suitable for a research-oriented or dynamics-driven Unity prototype because it explicitly covers articulated dynamics, collisions, contacts, and friction and provides C# bindings plus a Unity plug-in. The README does not promise a complete game-production toolchain.

  • The README names robotics, biomechanics, graphics, and animation among its target areas.
  • The core runtime includes joints, actuators, constraints, collisions, contacts, and friction.
  • The official bindings list includes C# bindings and a Unity plug-in, reducing the need to wrap the C API yourself.
  • Native desktop windows and browsers provide interactive visualization, but the README does not describe complete Unity coverage for rendering, asset management, or shipping workflows.
  • README: research and development in robotics, biomechanics, graphics and animation
  • Project insight: articulated rigid-body simulation including joints, actuators, constraints, collisions, contacts, and friction
  • Bindings: C# bindings and Unity plug-in
  • README: interactive visualization in native desktop windows and web browsers
Not stated in the README:The Unity versions and target platforms supported by the plug-in;Whether a full game-editor, rendering, networking, or asset pipeline is required;Whether the current Unity model format can be converted directly to MJCF
It depends I need to run multi-joint contact dynamics through the C API on a Linux AArch64 device while minimizing dynamic-memory overhead in the control loop. Is MuJoCo suitable for direct integration?
For: A robotics developer writing high-frequency control loops in C/C++ on a Linux AArch64 platform

It depends: MuJoCo’s architecture fits this control-loop pattern well, and Linux AArch64 is an explicitly supported prebuilt target, but the README does not promise hard real-time behavior or a control frequency on your hardware.

  • MuJoCo exposes a C API, and its runtime operates on low-level data structures preallocated by the built-in XML compiler, which is intended to maximize performance.
  • Prebuilt releases support Linux x86-64 and AArch64, so your platform is within the documented release targets.
  • Model compilation is separated from runtime simulation, allowing model loading to remain outside the control loop.
  • The README does not specify hard real-time guarantees, maximum control rates, scheduling requirements, or benchmark results for a particular AArch64 chip.
  • README: MuJoCo has a C API
  • README: the runtime simulation module is tuned to maximize performance and operates on low-level data structures preallocated by the built-in XML compiler
  • Installation / Prebuilt binaries: Linux (x86-64 and AArch64)
  • Project insight: MuJoCo does not directly provide an RTOS or hardware-driver solution
Not stated in the README:The target AArch64 processor and Linux distribution;Whether hard real-time guarantees and a specific control period are required;The model’s degrees of freedom, contact count, and concurrency configuration

✨ Highlights

  • The C API uses preallocated low-level data structures for performance
  • MJX, LQR, and differentiable-physics tutorials cover control and learning
  • Python bindings support Python 3.11 and newer
  • Prebuilt binaries cover Linux, Windows, and macOS

🔧 Engineering

  • MuJoCo provides a C API, Python bindings, and a Unity plug-in for articulated structures interacting with environments
  • MuJoCo Studio and simulate provide interactive visualization on desktop and in browsers
  • MJX is based on JAX, with additional rollout, LQR, and differentiable-physics tutorials

⚠️ Risks

  • Tip commits on the main branch may be unstable, and source builds require the documentation
  • Prebuilt Linux Python wheels target manylinux2014 distributions
  • The project states that MuJoCo is not an officially supported Google product

👥 For who?

  • Researchers in robotics, biomechanics, and graphics can use the C API
  • Python users can start with Google Colab tutorials and the Python 3.11 bindings
  • Reinforcement-learning and control developers can use MJX, LQR, and differentiable-physics material