3 releases

0.0.4 Dec 23, 2022
0.0.3 Dec 9, 2022
0.0.2 Oct 18, 2022

#135 in Robotics

Download history 2/week @ 2024-02-07 49/week @ 2024-02-14 12/week @ 2024-02-21 18/week @ 2024-02-28 4/week @ 2024-03-06 3/week @ 2024-03-13 1/week @ 2024-03-20 27/week @ 2024-03-27 48/week @ 2024-04-03

76 downloads per month
Used in 2 crates (via mujoco-rust)

MIT license

12KB
196 lines

mujoco-rust

MuJoCo bindings for Rust

Installation requirements

These bindings require that MuJoCo be installed before building. The build system assumes that MuJoCo is installed into ~/.local on UNIX-based systems and C:\Program Files\MuJoCo on Windows, but any installation directory can be used, as long as either the environment variable MUJOCO_DIR or MUJOCO_PREFIX is set to the root of the installation.

Usage

These wrappers use mujoco-rs-sys to provide rust bindings to the MuJoCo C API. The mujoco-rs-sys crate is not intended to be used directly, but instead is used by mujoco-rust to provide a more idiomatic rust interface to the MuJoCo API.

Example Usage

Cargo.toml

[dependencies]
mujoco-rust = { version = "0.0.4" }

main.rs

let model = mujoco_rust::Model::from_xml("simple.xml".to_string()).unwrap();
let simulation = MuJoCoSimulation::new(model);

Dependencies

~0–1.9MB
~37K SLoC