Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Bevy MuJoCo
This is work in progress
Import MJCF files into Bevy and run simulations with MuJoCo.
Implementation Notes
MuJoCo has 2 modes with different coordinate systems for bodies
-
pausedmode where all translations and rotations are extracted frommj_ModelinMuJoCo-Rustasbody.pos,body.quatin parent's body coordinate system. To make them work nice with bevy the body structure from mujoco has to be transformed to a tree structure withbody_tree()call. Thenbody_treeis spawned into the bevy world recursively — a nice contraption to do it insetup_mujoco. -
simulationmode where translations are extracted fromsim.xpos()andsim.xquat()— and this time they are in global frame. Since bodies are spawned hierarchically translations and rotations need to be converted to a parent coordinate system — it happens insimulate_physics.
Getting Started
Prerequisites
bevy~0.10.0MuJoCo2.3.5 installed in~/.local/mujocofor Linux orC:/Program Files/Mujocofor Windows- nightly Rust. Compile with
cargo +nightly build
Usage
// 1. Import bevy_mujoco
use *;
// 2. Setup bevy_mujoco Plugin. MuJoCo Plugin would spawn entities to the world
// 3. You can control your robots here
copy build.rs to root of your project to use in with Windows environments. it will copy mujoco.dll to a build dir of your application
To run tests and example initialize mujoco_menagerie submobule with
See example for simulating Unitree A1 robot.