Skip to content

rust-control/rusty_mujoco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rusty MuJoCo Binding

Rust bindings for the MuJoCo physics simulator

MuJoCo Version

3.3.2

Requirements

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

Note & Tips

  • For example on x86_64 Linux, run:

    wget https://github.com/google-deepmind/mujoco/releases/download/3.3.2/mujoco-3.3.2-linux-x86_64.tar.gz
    tar -xzf mujoco-3.3.2-linux-x86_64.tar.gz

    to download & expand MuJoCo 3.3.2.
    On other platforms, do the same with the appropriate archive file for 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.

Previous Works

License

rusty_mujoco is licensed under MIT LICENSE.