MuJoCo is a physics engine which can do very detailed efficient simulations with contacts. This library lets you use MuJoCo from Python.
Note that MuJoCo tends to change significantly between versions, so this library is likely to stay pinned to 1.31 for the near future.
You can install this library using:
pip install mujoco-py
MuJoCo isn't open-source, so you'll also need to set download the MuJoCo binaries and obtain license key.
- Obtain a 30-day free trial on the MuJoCo website: https://www.roboti.us/license.html. The license key will arrive in an email with your username and password.
- Download the MuJoCo version 1.31 binaries for Linux, OSX, or Windows.
- Download your license key (the
mjkey.txt
file from your email) and unzip the downloaded mjpro bundle. - Place these in
~/.mujoco/mjkey.txt
and~/.mujoco/mjpro131
. You can alternatively set the following environment variables:
export MUJOCO_PY_MJKEY_PATH=/path/to/mjkey.txt
export MUJOCO_PY_MJPRO_PATH=/path/to/mjpro131
Run:
make test