Rust bindings for the MuJoCo physics simulator
- 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
)
-
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 tomujoco-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 exampleLD_LIBRARY_PATH=$MUJOCO_DIR/lib cargo run
on Linux)
Cargo.toml
[dependencies]
rusty_mujoco = "0.1.0"
src/main.rs
fn main() {
// TODO DOCUMENT...
}
See the examples directory for working examples.
- TheButlah/mujoco-rs : archived by the owner on Sep 19, 2021.
- MuJoCo-Rust/MuJoCo-Rust : seems not maintained anymore (last commit on 2 years ago) and not compatible with MuJoCo 3+.
rusty_mujoco is licensed under MIT LICENSE.