rusty_mujoco 0.1.0

Rust bindings for the MuJoCo physics simulator
Documentation

MuJoCo Version

3.3.2

Requirements

  • MuJoCo 3.3.2 downloaded and expanded as it is (don't rename or partially move the files)
  • MUJOCO_DIR environment variable set to the path of the MuJoCo directory (e.g. $HOME/.mujoco/mujoco-3.3.2)

Note & Tips

  • Example commands to download & expand MuJoCo 3.3.2:

    wget https://github.com/google-deepmind/mujoco/releases/download/3.3.2/mujoco-3.3.2-<YOUR OPTION>
    tar -xzf mujoco-3.3.2-<YOUR OPTION>
    

    Replace <YOUR OPTION> depending on your system.

  • One way to setup is to install MuJoCo to a default standard path like /usr/local/lib/ (or a folder in PATH on Windows), then if needed create symlink to mujoco-3.3.2/lib/libmujoco.so there, and insert to your shell config file:

    # example on Linux with /usr/local/lib/
    export MUJOCO_DIR="/usr/local/lib/mujoco-3.3.2"
    

    Or if you'd like to avoid to install MuJoCo to such a system directory:

    # example on Linux with $HOME/.mujoco/
    export MUJOCO_DIR="$HOME/.mujoco/mujoco-3.3.2"
    export LD_LIBRARY_PATH="$MUJOCO_DIR/lib:$LD_LIBRARY_PATH"
    
  • Depending on your setting, be sure to specify $MUJOCO_DIR/lib as shared library path when executing your app (for example LD_LIBRARY_PATH=$MUJOCO_DIR/lib cargo run on Linux)

Usage

Cargo.toml

[dependencies]
rusty_mujoco = "0.1.0"

src/main.rs

fn main() {
    // TODO DOCUMENT...
}

See the examples directory for working examples.

License

rusty_mujoco is licensed under MIT LICENSE.