Python wrapper for MuJoCo physics simulation.
This is a simple python wrapper around the MuJoCo physics simulation. I wrote it when I couldn’t fix the GLEW initialization error with mujoco-py. Please note: this library is a partial replacement (not a supplement) to mujoco-py. It is does not have all of the features of mujoco-py but it is much simpler and easier to understand. If there are additional capabilities you want added, please feel free to post an issue.
pip install mujoco
Building pypi wheels for linux packages that use C extensions (like this one) is very difficult (nay impossible?). Please install from source:
cd /path/to/cloned/directory make pip install -e .
Examples are located in the examples/ directory.
EGL is a graphics library for linux GPUs which speeds up offscreen rendering. First, you need to install libegl1-mesa and check that /usr/include/EGL/egl.h exists. Second, you must define the environment variable EGL=1. Otherwise, the code defaults to GLFW. Note that when using EGL, you cannot render to the screen (you can still render offscreen).
One of the main design decisions behind this implementation was to use the exact same libraries that Emo’s original MuJoCo code uses in the provided Makefile. That way if my version doesn’t work, you can bet that Emo’s code doesn’t work either. I think the reason why mujoco-py stopped working is that it tried to get fancy with the libraries and dynamically switch between EGL- and GLFW-friendly graphics libraries.
Sadly, I haven’t been able to load my docs to readthedocs.org yet, because of difficulties over importing the original MuJoCo headers on their servers (suggestions welcome). However, if you wish to build the docs yourself, the following commands should do it for you:
cd /path/to/cloned/directory make cd docs/ make html