MuJoCo (Multi-Joint Dynamics with Coherence) is an open-source physics engine developed and maintained by Google DeepMind. It is designed to simulate composite structures and object interactions, making it highly useful for robotics, biomechanics, computer graphics, animation, and machine learning.
Unlike general-purpose physics engines used in games, MuJoCo focuses on the accurate and practical simulation of complex mechanical systems. It offers a native C API, visualization tools, Python bindings, and integration with various other development environments.
The combination of its simulation capabilities, computational tools, and compatibility with machine learning makes it a popular choice for researchers and developers working in the fields of robotics and reinforcement learning.
Features
High-Performance Physics Simulation
MuJoCo provides a physics engine optimized for simulating articulated systems interacting with their environments.
It handles rigid bodies, joints, constraints, collisions, friction, and contact forces. Its simulation architecture uses preallocated data structures to reduce runtime overhead and improve computational efficiency.
This makes it suitable for applications involving robotic arms, humanoid robots, legged locomotion, mechanical systems, and other complex physical models.
MJCF Model Description
MuJoCo uses its own XML-based modeling format called MJCF (MuJoCo XML). It allows developers to describe physical environments, including bodies, joints, geometries, actuators, sensors, materials, and simulation parameters.
The built-in XML compiler converts these descriptions into optimized simulation structures.
MJCF also supports reusable components, procedural model construction, and external assets, making it easier to manage complex simulation environments.
MuJoCo additionally supports URDF model import, allowing developers to work with robot descriptions from other robotics tools.
Contact and Collision Simulation
One of MuJoCo's defining capabilities is its handling of contact dynamics.
It provides collision detection and constraint-based contact simulation for objects interacting with each other or their surroundings.
The engine supports different collision geometries, friction models, and contact parameters. These features are particularly important for robotics research, where realistic interaction between robots and objects is essential.
Its contact solver is designed to provide stable and efficient simulation rather than relying exclusively on conventional rigid-body collision handling.
Robotics and Actuator Simulation
MuJoCo provides extensive support for modeling robotic mechanisms.
Developers can define joints, actuators, transmissions, sensors, and control inputs to simulate robotic movement and behavior.
It supports different joint configurations, including hinge, slide, ball, and free joints. Actuator models can represent motors and other mechanisms used to control simulated robots.
This makes it useful for testing robotic control algorithms before deploying them on physical hardware.
Python Integration
MuJoCo provides official Python bindings through the mujoco package.
Developers can load models, control simulation steps, access physical state information, modify model parameters, and interact with the simulation directly from Python.
Installation is straightforward:
pip install mujocoThe Python package includes the native MuJoCo library, so a separate installation of the C/C++ runtime is generally unnecessary.
The Python API is particularly useful for machine learning experiments, robotics research, simulation automation, and reinforcement learning environments.
Reinforcement Learning and MJX
MuJoCo is widely used in reinforcement learning research because it provides efficient and repeatable physics simulations.
Its ecosystem includes MJX, an implementation built using JAX that enables physics simulation on supported accelerators.
MJX makes it possible to explore batched simulation, accelerator-based computation, and differentiable physics workflows.
These capabilities are valuable when training robotic control policies that require large numbers of simulation steps.
Interactive Visualization
MuJoCo includes a native visualization application called simulate.
It allows users to load models, inspect simulated environments, interact with objects, and observe physical behavior in real time.
The visualization system uses OpenGL and provides tools for examining simulation states, contacts, and other physical properties.
MuJoCo also offers MuJoCo Studio and browser-based visualization through its WebAssembly implementation.
Plugin Architecture
MuJoCo supports plugins that extend its simulation capabilities.
Plugins can introduce custom sensors, actuators, modeling components, and other functionality without requiring developers to modify the core engine.
This makes the architecture suitable for specialized robotics applications and experimental simulation features.
Unity Integration
MuJoCo provides a Unity plugin for developers who want to combine its physics simulation capabilities with the Unity development environment.
This is useful for robotics visualization, interactive simulation environments, and applications that benefit from Unity's rendering and user interface tools.
Additional language integrations are available through community projects, including Java, Rust, Julia, and Swift bindings.
Download MuJoCo 4.1.0 - Physics Engine - Software Mirrors |
|---|
MuJoCo 4.1.0 - Physics Engine for Windows |
MuJoCo 4.1.0 - Physics Engine for macOS |
MuJoCo 4.1.0 - Physics Engine for Linux |
MuJoCo 4.1.0 - Physics Engine Source Code |
MuJoCo 4.1.0 - Physics Engine Release Notes:Version 4.1.0 (December 1, 2026)Significant new features
engine_simd.h; 6a6595c, d4c37d5) supporting AVX/FMA, ARM NEON, WebAssembly SIMD128, and a
-- scalar fallback across both double and single precision (mjUSESINGLE, 298d367), replacing the legacy
-- double-precision AVX-only BLAS header (e603d5f). Vectorized hot kernels across dense and sparse linear
-- algebra (c4b0610, 17cb305, 6f5bbec, 596c94b, 90c2ad5), the primal
-- solver and constraint regularization (6c9e627, 9995525, ec0384c), elliptic friction
-- cone updates (dbf9a74), flex contact Jacobian rotation (d5f6b13), and broadphase/dynamic BVH
-- bounding boxes (186f4dc, d6bcc2a).
09b8ea2, 09834d3, d7fda58), supernode-accelerated sparse matrix squaring,
-- transposition, and matrix-vector products (681731c, 8148157, 020335c,
-- fa6c9fb), 2-column/4-row blocked Cholesky updates (6054e3c), dense elliptic Newton Hessian
-- folding and refactorization thresholds (c6ac133, 0c51e88), single-island fast paths
-- (61659cf, 5e06cd0), PGS sweeps and fused Nesterov updates (72add57), faster inertia
-- factorization and impedance assembly (05b1ae4, 5ad852a), radix-sort broadphase with single-pass
-- projection frame (2787bae, 9742035), cached relative-frame OBB tests and streamlined BVH
-- midphase traversal (27ebada), and warm-started convex mesh support queries and streamlined GJK simplex
-- projection (6e384ac, 7bd0173).
mjsWrap.turns. Below, a drum at three angles of the hinge and a fairlead
-- displaced along the axis.
Engine[!WARNING] Breaking changes> 4.
springlength Previously the spring acted only beyond
damping and a taut one could push. Now the spring and damper combine into a smooth tension that is zero when slack, never negative and at most three times the spring force. A cable with zero stiffness now applies no force, including from its damping, and the compiler warns when such a cable is damped. Damped cables now also render as catenaries when slack. All other tendons are unchanged. This applies to MJX and MuJoCo Warp as well.> Migration: To keep the previous behavior for lengths above a small $\epsilon > 0$, set
plasticity shift the lower bound along with
>
5.
materializing bytes in single precision).> Migration: Remove uses of
>
6. model arrays, which weighted the arithmetic averaging of contact solver parameters. They were rarely used because arithmetic averaging is poorly suited to combining solver parameters; removing them also frees the
for the new global option/solmix attribute below.
max, geometric, or min; default max).
-- and solimp are combined (average or series; default average). The new series mode models two
-- compliant surfaces in series so softer surfaces dominate physically and smooth (solimp[0] = 0) contact onset is
-- preserved.
(dim - 1) factors (~5–30% faster elliptic Newton
solves). Thanks to @adenzler-nvidia for proposing the optimization in MJWarp pull
request 1879.
mjModel.ten_J_colind) by stopping ancestor walks at the endpoints' lowest common ancestor, skipping
shared ancestor DOFs whose contributions cancel (~7–22% faster stepping on MyoSuite musculoskeletal models). Thanks
to @kaibohex for identifying the opportunity in MJWarp issue
1733 and to @vishalkotak for the
implementation in MJWarp pull request
2014.
Deformables10.64959ac81 Passive interpolated flexes are no longer
-- reduced to mjMAXCONPAIR (50) contacts per geom via farthest-point selection, preventing contact-set churn and
-- resting jitter when more than 50 surface vertices touch a geom (solver cost remains independent of contact count via
-- aggregated contact CSR).
11. 7b7fc90c6 Passive flex contacts now also handle
-- collisions with moving and mocap rigid bodies (previously only flex-flex, self-collision, and static-geometry pairs
-- took the passive path while moving-body pairs fell back to the constraint solver), scaling pair stiffness by the
-- minimum participating effective mass and excluding active passive-contact free bodies from the decoupled free-body
-- gyroscopic solve.
12. 15c2f1183 Passive and IPC
-- flex contacts with condim 3 or higher now model isotropic lagged
-- Coulomb sliding friction using the pair's first friction coefficient (capped at the
-- viscous slip threshold 1e-3 m/s). Previously, both modes ignored condim and were always frictionless.
-- Existing models using passive or IPC flex contacts with condim >= 3 (the default) now experience contact
-- friction; set condim="1" for frictionless behavior. In IPC mode, mjData.flexvert_lambda now stores the
-- barycentrically weighted sum of touching pair multipliers (previously the maximum across touching pairs).
13. 1554e7d3d, 5f99d0d25 Under the discrete integrator, the
-- unconstrained smooth solve (qacc_smooth) now follows the selected solver: Newton
-- solves $(M + S)\\,\dot{v}_{\text{smooth}} = f$ directly by Cholesky (reusing the 3x3-block sparse factor on
-- covered 1D/2D flexes and general sparse/dense Cholesky otherwise), eliminating mjWARN_INERTIA under-convergence
-- on 3D passive contacts and speeding up stiff interpolated-flex mechanisms
-- (model/flex/mechanisms/cantilever.xml ~3.3x faster). Under CG, the smooth solve for 3D and interpolated
-- flexes uses symmetric Gauss-Seidel (Eisenstat) preconditioning instead of diagonal
-- preconditioning, reusing the assembled stiffness matrix in place with zero extra arena memory (cutting smooth-solve
-- iterations 2-3x and speeding up stepping by ~15% on model/plastic/clay.xml, and up to ~1.9x on unconstrained 3D
-- tetrahedral meshes).
14. f9420c6da Fixed effective-metric PCG stalls and spurious mjWARN_INERTIA warnings on 2D flexes with
-- passive contacts by including fully covered passive flex contacts in the sparse Cholesky preconditioner. Previously,
-- passive flex contacts were omitted from the preconditioner, causing the implicit solve to stall or under-converge on
-- stacked cloth scenes (2.1-2.7x faster on drape.xml; existing models with passive flex contacts can change
-- trajectory due to the more accurate solve).
15. 73327e000 Added mjModel.flex_cellempty (nflexcell x 1) and mjModel.flex_celladr, flagging the
-- empty (pruned) cells of interpolated flexes. Points of an interpolated flex, such as contact points, are now
-- evaluated in their active cell: their natural cell, or the nearest non-empty cell if it is empty, consistently with
-- the vertex positions (flex_vertcell). Previously contact weights near pruned cells could weight the pinned nodes
-- of the empty cell.
16. 630212fbb Fixed capsule collision against 2D flexes missing contacts along the
-- capsule shaft (when crossing triangle edges, lying coplanar with a triangle, or piercing a triangle interior) and
-- fixed a NaN for zero-length capsules and degenerate triangles. Existing models with capsule--2D-flex contacts can
-- change behavior. mjModel.flex_edgeflap is now populated for all 2D flexes, not only those with bending, so that
-- interior shared edges do not generate opposing contacts. Code that used a valid flap to detect bending must check
-- mjModel.flex_bendingadr instead.
Rendering17.d0def6e64 Added Kannala-Brandt fisheye projection and camera lens distortion coefficients:
-- projection now supports fisheye via mjPROJ_FISHEYE, and
-- distortion specifies up to mjNDISTCOEF = 8 coefficients for fisheye and
-- perspective cameras via mjsCamera.distortion and mjModel.cam_distortion.
[!WARNING] Breaking changes> 18.
-- changes will affect the way all models are rendered by the Filament renderer.> -- - The principal fix was to interpret material RGBA color values as linear colors instead of sRGB colors. This -- ensures that material colors defined in the model will match any texture colors also defined in the model. For -- example, the following two materials now appear identical (whereas previously they would not):>
> -- Because the above change can affect any model, other long-standing issues with the default rendering settings -- were fixed in the same release, so that their impact is concentrated in a single release.> -- - The tonal ranges for shadows, midtones, and highlights have been updated to a neutral weight. Previously, the -- weights were incorrectly set to 1.0, resulting in oversaturated colors. As a result, scenes may now appear -- darker and light intensities may need to be increased to compensate.> -- - The tone mapping and output color spaces for scenes without physical lights are now set to linear space -- instead of sRGB. (Recall that scenes without physical lights are rendered using a fallback lighting model -- as described here.) Before this change, you may have noticed that such -- scenes appeared "washed out" when rendered with the filament renderer compared to the classic renderer. To -- compensate for the darker scenes in these scenarios, the default intensity of the headlight and environment -- light has also been adjusted.> -- - The quality levels of the ambient occlusion settings have been reduced to match filament's recommended -- defaults. This change is less likely to be noticed visually and was included to improve performance.> -- Migration: Add the following to your model to revert back to previous defaults:>
> -- Note that the -- scenes without physical lights.> 19.
-- distance and global/fovy (matching the perspective view height at the lookat point) -- and place the eye behind the model's bounding sphere so zooming scales the view without near-plane clipping. -- Previously,
-- had no visible effect and toggling orthographic made the view jump. Fixed orthographic cameras -- (camera/fovy) are unchanged. In Studio and simulate, the Free Camera -- field-of-view control shows the vertical view height in length units while in orthographic mode, and editing it -- changes the camera distance rather than -- vertical extent that depends on
>
-- Migration: Models that set
-- Set
-- distance.> 20.
-- attenuated by one minus the Fresnel reflection weight (dielectrics only; metals are unchanged), so a surface with --
-- the fully lit diffuse surface, washing out reflections on bright materials.21. 4019e053c Added mjGEOM_DISC rendering-only geom type for flat double-sided discs and
-- annuli (size = [r_out, r_in, 0]).
22. 2a860e53f Added mjvOption.offset, an offset added to simulation coordinates when rendering, so that
-- several simulations of one model can be drawn side by side.
23. 77718b1fc Added image_diffuse_scale to mjrfLightParams to control the diffuse colour of image
-- based lights.
24. 6b907360c Fixed Filament planar reflections leaking geometry behind or crossing the mirror plane by
-- clipping the reflection camera at the mirror plane with an oblique near-plane projection (#3902).
25. 3f8569e2b Builtin textures with mark="cross" now draw a 2-pixel wide cross on even-sized textures so
-- that it is centered.
Compiler26.bbaec528d Sequentially appending elements to an mjSpec body tree now runs in $O(1)$ instead
-- of rebuilding the model's tree lists, making procedural model construction up to ~250x faster.
27. 50c5900d7 Added the facetexcoord attribute to mesh and
-- updated XML saving to emit it when mjsMesh.userfacetexcoord is set. Previously, saving an inline textured mesh
-- with per-corner UVs dropped userfacetexcoord, causing the saved XML to fail compilation or map UVs to the wrong
-- corners (#3931, reported by @andrewkaufman).
28. da306ace5 strippath no longer strips file names that match a registered
-- resource provider, such as package:// URIs. These names are not filesystem paths, and the
-- compiler already treats them as absolute when combining them with meshdir.
Plugins29.da306ace5 Added a first-party resource provider plugin, plugin/package_uri, that
-- serves ROS-style package:// URIs by locating packages through AMENT_PREFIX_PATH and ROS_PACKAGE_PATH
-- without depending on ROS. It is not included in release packages: build it from source and load the resulting shared
-- library with mj_loadPluginLibrary before parsing a model, so that URDF and MJCF files can reference ROS
-- package assets unchanged. Contribution by @noah-wardlow.
OpenUSD30.2f754ec82 The native C++ OpenUSD exporter and LayerSink now author
-- xformOp:translate (double3) and xformOp:orient (quatd) instead of xformOp:transform
-- (matrix4d), avoiding shear artifacts when USD or external renderers interpolate between time samples.
Models31.9a1af89e6 Upgraded the 3x3x3 cube
-- example model with calibrated mass and inertia, flush outer collision hulls, and an internal drive and 90-degree
-- detent mechanism. Standalone defaults now use timestep="0.002", the discrete
-- integrator, cone="elliptic", and face motor ctrlrange="-0.45 0.45" (previously
-- timestep="0.01", integrator="implicitfast", and ctrlrange="-0.05 0.05"; motor commands must now exceed
-- the ~0.17 N*m breakaway torque).
Bug fixes32.36a33b4f4 Fixed a memory leak in mujoco-core (introduced in 4.0.0) where import mujoco without
-- glfw installed stored the ImportError in mujoco.rendering.classic.gl_context and kept every local
-- variable on the importing call stack alive for the life of the process (#3928, reported by
-- @adenzler-nvidia).
33. 026907613 Fixed capsule-box collisions when the capsule's centerline intersects the box, which could miss
-- the contact.
34. ce23b6e70 Fixed floating-point cancellation and non-orthogonal fallback frames in mju_makeFrame and
-- mjc_PlaneCylinder for plane-capsule and plane-cylinder contacts on tilted planes. Previously, axes parallel or
-- nearly parallel to a tilted plane normal could produce non-orthogonal or singular contact frames and inaccurate
-- contact depths (especially in single precision). Discovered via MJWarp issue
-- 1949 and pull requests
-- 1950 (@YannBerthelot) and
-- 1989 (@etaoxing).
35. 82196b63e Under the discrete integrator, negative flex
-- damping is clamped to zero in the effective metric, like negative joint and tendon
-- damping, and its force is integrated explicitly. Previously it made the metric indefinite.
36. 82196b63e Under the discrete integrator, the ellipsoid
-- fluid model contributes the dissipative part of its drag derivative to the effective metric. The
-- symmetrized derivative used before is indefinite for slender shapes at small angles of attack.
37. 3f8569e2b Fixed Filament cube textures with texuniform being scaled inversely; they now match the
-- classic renderer. |
Performance and Compatibility
MuJoCo is designed around computational efficiency and accurate physics simulation.
Its C API provides direct access to simulation structures, while preallocated memory and optimized numerical algorithms help reduce runtime overhead.
The engine supports Linux, Windows, and macOS, with prebuilt binaries available for x86-64 and ARM64 platforms.
Developers can use MuJoCo through C/C++, Python, Unity, and other language integrations.
For machine learning workloads, MJX provides an alternative implementation using JAX, allowing compatible simulation operations to run on accelerators.
Actual performance depends on model complexity, collision geometry, solver settings, simulation frequency, and hardware capabilities. Large environments and complex contact interactions can still require substantial computational resources.
System Requirements
MuJoCo has relatively modest requirements for basic simulation, although more complex robotics and machine learning workloads benefit from stronger hardware.
Typical requirements include:
Linux, Windows, or macOS.
A compatible 64-bit processor.
OpenGL-compatible graphics hardware for native visualization.
Sufficient RAM for simulation models and application data.
CMake and a C++17 compiler when building from source.
Python 3.11 or newer for the current Python package, according to the repository's installation documentation.
Additional requirements depend on the selected integrations. MJX requires its Python and JAX dependencies, while Unity development requires a compatible Unity environment.
Pros and Cons
Pros
High-performance physics simulation.
Accurate articulated-body and contact dynamics.
Designed for robotics and biomechanics research.
Supports MJCF and URDF-based workflows.
Official Python bindings.
Integration with JAX through MJX.
Includes interactive visualization tools.
Supports custom simulation plugins.
Unity integration.
Available for Linux, Windows, and macOS.
Open-source under Apache-2.0.
Cons
Primarily designed for technical users and researchers.
Requires understanding of physics modeling and simulation concepts.
MJCF has a learning curve for beginners.
Complex environments can require substantial computational resources.
Some integrations require additional dependencies.
Not intended to replace general-purpose game engines.
How to Install
MuJoCo provides precompiled libraries for Linux, Windows, and macOS. These are the recommended option for developers who simply want to use the simulation engine.
For Python users, installation through PyPI is straightforward:
pip install mujocoThe package includes the native simulation library and Python bindings.
Developers who want to build the C/C++ engine from source need CMake and a compatible C++17 compiler.
Clone the repository and create a separate build directory:
git clone https://github.com/google-deepmind/mujoco.git
cd mujoco
mkdir build
cd buildConfigure and compile the project in Release mode:
cmake ../ -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallelTo install the compiled files into a custom directory:
cmake ../ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/mujoco
cmake --build . --parallel
cmake --install .The build system automatically downloads required dependencies through CMake FetchContent. Python bindings require a separate build process if they also need to be compiled from source.
Final Verdict
MuJoCo is an excellent physics engine for developers and researchers working with robotics, biomechanics, and machine learning. Its focus on articulated-body dynamics, contact simulation, and computational efficiency makes it particularly valuable for applications where accurate physical behavior matters.
Its official Python bindings and MJX implementation also make it an attractive platform for reinforcement learning experiments. Meanwhile, its C API, plugin architecture, and Unity integration provide flexibility for more specialized development projects.
The main limitation is its learning curve. MuJoCo is a technical simulation framework rather than a beginner-friendly visual application. Understanding MJCF, physical parameters, actuators, and contact dynamics requires some knowledge of physics and robotics.
Overall, MuJoCo is a powerful open-source choice for anyone developing robotic systems, training control algorithms, or researching physically accurate simulations.
Sources
Developer:
Google DeepMind
Operating System:
Windows / macOS / Linux
Date Added:
2026-12-01T19:07:18.032Z
Categories:

Post a Comment/Report Broken Link: