Expand description
§MuJoCo-rs
A wrapper around the MuJoCo C library with a Rust-native viewer. If you’re familiar with MuJoCo, this should be pretty straightforward to use as the wrappers mainly encapsulate some C structs or just rename them to match the Rust’s PascalCase style.
Currently, no direct functions are provided. Some of the functions are made into methods at appropriate
structs, while others can be found under mujoco_rs::mujoco_c module. Missing structs
can also be obtained there.
To access the lower-level ffi structs in the wrappers, call either the ffi() method
or the ffi_mut() method.
The main structs are wrappers::mj_model::MjModel and wrappers::mj_data::MjData.
The Rust-native viewer is available in viewer::MjViewer.
Modules§
- mujoco_
c - prelude
- Mujoco Rust wrappers
- util
- Utility related data
- viewer
- wrappers
- A set of wrappers around the MuJoCo types.
Macros§
- fixed_
size_ info_ method - Macro for reducing duplicated code when creating info structs to
items that have fixed size arrays in
MjDataorMjModel. This creates a methodX(self, name; &str) -> XInfo. - info_
with_ view - Creates the xInfo struct along with corresponding xView and xViewMut structs.
- view_
creator - Creates a $view struct, mapping $field and $opt_field to the same location as in $data.
Functions§
- get_
mujoco_ version - Returns the version string of the MuJoCo library