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§

mj_slice_view
Creates a PointerViewMut instance based on the pointer (ptr) and other lookup variables that define the mapping in MuJoCo’s mjModel struct. Format: source pointer, item id, map from item id to index inside the array of all items’ values, number of items, maximum number of elements inside the array of all items’ values

Functions§

get_mujoco_version
Returns the version string of the MuJoCo library