mujoco-py 1.50.1.0 release notes / what's new

OpenAI has released mujoco-py 1.50.1.0, a high-performance Python 3 library for robotic simulation using the MuJoCo engine. This release provides significant performance boosts and new capabilities designed to support deep learning and robotics research.

Batched Simulation and Performance Gains

mujoco-py 1.50.1.0 introduces the MjSimPool interface to enable efficient parallel simulations, which is critical for trajectory optimization and reinforcement learning methods such as TRPO, PI2, and LQR. The library achieves these gains through the use of OpenMP for data parallelism, and Cython and NumPy for direct-access memory management.

According to OpenAI, naive usage of the MjSimPool interface results in a 400% speedup over previous versions of the library and remains approximately 180% faster than optimized usage patterns employing Python's multiprocessing package. These performance improvements are primarily attributed to reduced access times to MuJoCo data structures.

GPU-Accelerated Rendering and Domain Randomization

The latest version of mujoco-py supports headless GPU rendering, which provides a speedup of approximately 40x compared to CPU-based rendering. This capability allows researchers to generate hundreds of frames per second of synthetic image data.

This acceleration is specifically leveraged for domain randomization—a technique used at OpenAI to vary textures of robots in simulation. This process helps robots better identify their own bodies when transferring learned behaviors from a simulated environment to the physical world.

Virtual Reality Integration

mujoco-py now provides an API sufficient to enable Virtual Reality (VR) interaction without requiring additional C++ code. OpenAI ported MuJoCo's C++ VR example to Python, enabling support for HTC Vive VR setups. While this support is currently considered experimental, it has been used internally by OpenAI.

Core Features and API Usage

mujoco-py 1.50.1.0 provides direct access to MuJoCo functions and data structures and supports all features of MuJoCo 1.50, including its improved contact solver.

For standard use cases, the MjSim class serves as a wrapper around the simulation model and data, allowing users to step the simulation and render images from camera sensors. For advanced users, the library provides lower-level interfaces to access MuJoCo C structs and functions directly.

Sources