Skip to main content

MuJoCo Warp (MJWarp)

Project description

MuJoCo Warp (MJWarp)

MJWarp is a GPU-optimized version of the MuJoCo physics simulator, designed for NVIDIA hardware.

[!NOTE] MJWarp is in Beta and under active development:

  • MJWarp developers will triage and respond to bug report and feature requests.
  • MJWarp is mostly feature complete but requires performance optimization, documentation, and testing.
  • The intended audience during Beta are physics engine enthusiasts and learning framework integrators.

MJWarp uses NVIDIA Warp to circumvent many of the sharp bits in MuJoCo MJX. MJWarp is integrated into both MJX and Newton.

MJWarp is maintained by Google DeepMind and NVIDIA.

Getting started

There are a few ways to jump into using MuJoCo Warp:

If you would like to train robot policies using MJWarp, consider using a robotics research toolkit that integrates it:

Installing for development

MuJoCo Warp is currently supported on Windows or Linux on x86-64 architecture (to be expanded to more platforms and architectures soon).

CUDA

The minimum supported CUDA version is 12.4.

Linux

git clone https://github.com/google-deepmind/mujoco_warp.git
cd mujoco_warp
python3 -m venv env
source env/bin/activate
pip install --upgrade pip
pip install uv

Windows (native Python only, not MSYS2 or WSL)

git clone https://github.com/google-deepmind/mujoco_warp.git
cd mujoco_warp
python -m venv env
.\env\Scripts\Activate.ps1  # For MSYS2 Python: env\bin\activate
pip install --upgrade pip
pip install uv

Then install MJWarp in editable mode for local development:

uv pip install -e .[dev,cuda]

Now make sure everything is working:

pytest

Should print out something like XX passed in XX.XXs at the end!

If you plan to write Warp kernels for MJWarp, please use the kernel_analyzer vscode plugin located in contrib/kernel_analyzer. Please see the README.md there for details on how to install it and use it. The same kernel analyzer will be run on any PR you open, so it's important to fix any issues it reports.

Compatibility

The following features are implemented:

Category Feature
Dynamics Forward, Inverse
Transmission All
Actuator Dynamics All except USER
Actuator Gain All except USER
Actuator Bias All except USER
Geom All
Constraint All
Equality All
Integrator All except IMPLICIT
Cone All
Condim All
Solver All except PGS, noslip
Fluid Model All
Tendon Wrap All
Sensors All except GEOMDIST, GEOMNORMAL, and GEOMFROMTO with BOX-BOX; PLUGIN, USER
Flex VERTCOLLIDE, ELASTICITY
Mass matrix format Sparse and Dense
Jacobian format DENSE only (row-sparse, no islanding yet)

Differentiability via Warp is not currently available.

Viewing simulations

Explore MuJoCo Warp simulations using an interactive viewer:

mjwarp-viewer benchmark/humanoid/humanoid.xml

This will open a window on your local machine that uses the MuJoCo native visualizer.

Benchmarking

Benchmark as follows:

mjwarp-testspeed benchmark/humanoid/humanoid.xml

To get a full trace of the physics steps (e.g. timings of the subcomponents) run the following:

mjwarp-testspeed benchmark/humanoid/humanoid.xml --event_trace=True

mjwarp-testspeed has many configuration options, see mjwarp-testspeed --help for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mujoco_warp-0.0.2.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mujoco_warp-0.0.2-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file mujoco_warp-0.0.2.tar.gz.

File metadata

  • Download URL: mujoco_warp-0.0.2.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for mujoco_warp-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3a357a2b73aae8add6956b0fff0e68b8428fb793dee952abf77c1860bc293ca3
MD5 b671a8a3ada8dd1d792ea2114eea83dc
BLAKE2b-256 6b2de6a6eba33b7aa35f1ca405c1e6182583574ff277fdf3e531477b1db1bce4

See more details on using hashes here.

File details

Details for the file mujoco_warp-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mujoco_warp-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for mujoco_warp-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d78a096a20fa786f78ca1842b22f1798bf45128614bb4547155c3d77e4a76e8
MD5 0a35cfeafc7908d16dbd2631a689681f
BLAKE2b-256 81ef6affa8e9ba6ad336d6132fe7d68c09c0243dd977e3fc0abd739902512d55

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page