MuJoCo Setup on macOS
MuJoCo stands for Multi-Joint dynamics with Contact. Generally, any reinforcement algorithm takes in pixels as inputs viz. a game state. In MuJoCo, the inputs are the angles. When we use the trained models on real-world robots, they perform well.
To set up the MuJoCo environment we need to have a license. We can take a free 30-day trial license or student license or personal/commercial licenses. You can go to this page for details.
- Download the key for the respective OS. In my case, I chose free 30-day trial on OSX which downloaded a file
- Change the permissions of the file by running
chmod 777 getid_osx
- Run the file in terminal
- It will generate the Computer ID.
- Copy that and paste in the website and provide your details.
- You will receive an email with License.txt and mjkey.txt. Download them
- Click here to download the mujoco-py for macOS. Unzip it.
- Paste these downloaded files ( License.txt and mjkey.txt) inside mujoco200 directory.
- Move the directory to HOME by running
mv mujoco200 ~/.mujoco/mujoco200
- Add these lines in that bash_profile file
14. If it is successful, it should open the below simulator.
MuJoCo python failing on macOS older version
brew install llvm boost hdf5
There is no way you don’t have
llvm and still want to proceed with
gcc . If you are in an older version of macOS Sierra like me, upgrade your
gcc to new versions.
llvm especially when you are running out of memory is painful. It takes a lot of time. It is around 1–3 GB in size.
Please do not try to install installing
llvm before upgrading your
gcc . It is tonnes of time waste and finally,
llvm throws an error saying
incompatible gcc version .