Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.63 KB

README.md

File metadata and controls

54 lines (38 loc) · 1.63 KB

mujoco-c

MuJoCo (Multi-Joint dynamics with Contact) is a physics-based simulation engine with graphics and animation for the C target. This repo defines a base reactor and some example derived reactors. The MuJoCoBase reactor provides a single simulator with graphical animation. The derived reactors customize this base class for particular MuJoCo model files.

Prerequisites

Linux (Ubuntu)

  1. Install GLFW, a graphics library used by MuJoCo
apt install libglfw3-dev
  1. Download a prebuilt version of Mujoco v3.2.6 and install it to /opt/mujoco. The following works for x86, for aarch64, change the download path accordingly (https://github.com/google-deepmind/mujoco/releases/tag/3.2.6)
wget https://github.com/google-deepmind/mujoco/releases/download/3.2.6/mujoco-3.2.6-linux-x86_64.tar.gz
tar xvf mujoco-*
sudo mv mujoco-3.2.6 /opt/mujoco

Alternatively, Mujoco can be built from source as explained under the section for MacOS below.

macOS

  1. Install GLFW, a graphics library used by MuJoCo
brew install glfw
  1. Build Mujoco v3.2.6 from source and install to /opt/mujoco
git clone https://github.com/google-deepmind/mujoco.git -b 3.2.6
cd mujoco
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mujoco
cmake --build .
sudo cmake --install .

All platforms

If mujoco is installed to a different location the mujoco.cmake must be updated accordingly.

Demos