This library is one of our core tools for deep learningrobotics research(opens in a new window), which we’ve now released as a major version ofmujoco-py(opens in a new window), our Python 3 bindings for MuJoCo. mujoco-py1.50.1.0(opens in a new window)brings a number of new capabilities and significant performance boosts. New features include:
## Batched simulation
Many methods in trajectory optimization and reinforcement learning (likeLQR(opens in a new window),PI2(opens in a new window), andTRPO(opens in a new window)) benefit from being able to run multiple simulations in parallel. mujoco-py uses data parallelism throughOpenMP(opens in a new window)and direct-access memory management throughCython(opens in a new window)andNumPy(opens in a new window)to make batched simulation more efficient.
Naive usage(opens in a new window)of the new version’sMjSimPool(opens in a new window)interface shows a 400% speedup over the old, and still about 180% over an optimized and restricted usage pattern using Python’smultiprocessing package(opens in a new window)to gain the same level of parallelism. The majority of the speedup comes from reduced access times to the various MuJoCo data structures. Check out`examples/simpool.py`for a tour of MjSimPool.
## High performance texture randomization
We use thedomain randomization(opens in a new window)technique across many projects at OpenAI. The latest version of mujoco-py supports headless GPU rendering; this yields a speedup of ~40x compared to CPU-based rendering, letting us generate hundreds of frames per second of synthetic image data. In the above (slowed down) animation we use this to vary the textures of one of our robots, which helps it identify its body when we transfer it from the simulator to reality. Check outexamples/disco_fetch.py(opens in a new window)for an example of randomized texture generation.
## Virtual Reality with mujoco-py
The API exposed by mujoco-py is sufficient to enable Virtual Reality interaction without any extra C++ code. We ported MuJoCo’sC++ VR example(opens in a new window)to Python using mujoco-py. If you have an HTC Vive VR setup, you can give try it usingthis example(opens in a new window)(this support is considered experimental, but we’ve been using it internally for a while).
The simplest way to get started with mujoco-py is with theMjSim class(opens in a new window). It is a wrapper around the simulation model and data, and lets you to easily step the simulation and render images from camera sensors. Here’s a simple example:
`1from mujoco_py import load_model_from_path, MjSim23model = load_model_from_path("xmls/tosser.xml") 45sim = MjSim(model)6sim.step()7print(sim.data.qpos)8# => [ -1.074e-05 1.043e-04 -3.923e-05 0.000e+00 0.000e+00]`
For advanced users, we provide a number of lower-level interfaces for accessing the innards of the MuJoCo C structs and functions directly. Refer to theREADME(opens in a new window)and thefull documentation(opens in a new window)to learn more.
Jonas Schneider, Peter Welinder, Alex Ray, Jonathan Ho, Wojciech Zaremba
Introducing Whisper Release Sep 21, 2022
Techniques for training large neural networks Publication Jun 9, 2022
Introducing Triton: Open-source GPU programming for neural networks Release Jul 28, 2021
Our Research * Research Index * Research Overview * Research Residency * OpenAI for Science * Economic Research
Latest Advancements * GPT-5.3 Instant * GPT-5.3-Codex * GPT-5 * Codex
Safety * Safety Approach * Security & Privacy * Trust & Transparency
ChatGPT * Explore ChatGPT(opens in a new window) * Business * Enterprise * Education * Pricing(opens in a new window) * Download(opens in a new window)
Sora * Sora Overview * Features * Pricing * Sora log in(opens in a new window)
API Platform * Platform Overview * Pricing * API log in(opens in a new window) * Documentation(opens in a new window) * Developer Forum(opens in a new window)
For Business * Business Overview * Solutions * Contact Sales
Company * About Us * Our Charter * Foundation * Careers * Brand
Support * Help Center(opens in a new window)
More * News * Stories * Livestreams * Podcast * RSS
Terms & Policies * Terms of Use * Privacy Policy * Other Policies
(opens in a new window)(opens in a new window)(opens in a new window)(opens in a new window)(opens in a new window)(opens in a new window)(opens in a new window)
OpenAI © 2015–2026 Manage Cookies
English United States