Crate mujoco_rs

Crate mujoco_rs 

Source
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 MjData or MjModel. This creates a method X(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