mujoco-py DocumentationΒΆ

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.

See the README for installation instructions and example usage.

mujoco-py allows access to MuJoCo on a number of different levels of abstraction:

  • Directly from Cython (low-level): Raw Cython declarations are provided for using the MuJoCo C structs and functions directly in your own Cython code.
  • Using PyMjData: Time-dependent data (medium-level): These wrappers are lightweight Cython cdef classes that expose MuJuCo data to Python space. The data in the MuJoCo structs is exposed as NumPy arrays bound to Mujoco-allocated memory, so there is no copying overhead when accessing or modifying MuJoCo state from Python. For more information on how this works internally, see [this document](./doc/cython_wrappers.md).
  • Using mujoco_py.MjSim (high-level): mujoco_py.MjSim manages a stateful simulation similar to the MujocoEnv class found in Gym

.