This example leaves a single object in the scene and visualizes it.
- Of course
rusty_mujocoRequirements - Additionally
glfwPrerequisites
Pass the path to a MuJoCo model XML file as an argument. For example,
you can use the humanoid.xml model provided by MuJoCo:
cargo run --example visualize_left_object -- $MUJOCO_LIB/../model/humanoid/humanoid.xml(replace the path to humanoid.xml with yours)
Options:
--camera <camera name>: Specify the name of camera to use for visualization (optional). If not provided, the default camera will be used.- example:
--camera sidefor the humanoid model
- example:
Depending on your setting, you may need to specify:
MUJOCO_LIBenvironment variable, to the MuJoCo directory path (e.g.$HOME/.mujoco/mujoco-3.3.2/lib)LD_LIBRARY_PATH(Linux),DYLD_LIBRARY_PATH(macOS), orPATH(Windows) configuration for searching the MuJoCo library path
like:
LD_LIBRARY_PATH="$MUJOCO_LIB" cargo run --example visualize_left_object -- $MUJOCO_LIB/../model/humanoid.xml