Mujoco Toolbox¶
A modern simulation wrapper for Google DeepMind’s MuJoCo.
Load MJCF or URDF models, run them, record per-step data, and render video in a few lines:
>>> import mujoco_toolbox as mjtb
>>> sim = mjtb.Simulation("robot.xml", duration=5).run(render=True)
>>> sim.save("robot.mp4")
>>> sim.captured_data["qpos"]
- Submodules:
sim:Simulation, the main entry point.builder: Merge MJCF/URDF files and XML strings into one model.controllers: Ready-made control callbacks.assets: Reusable world and scene XML.
This package is pre-1.0 and its API may change between minor releases. Report issues at https://github.com/MGross21/mujoco-toolbox/issues.
Contents:
Configuration¶
Module-level settings, read at run time.
- mujoco_toolbox.CAPTURE_PARAMETERS: set[str] | str¶
Default
MjDatafields recorded bySimulation.run.Applies to every
Simulationcreated without acaptureargument. Set to"all"to record every numeric field:>>> mjtb.CAPTURE_PARAMETERS = "all"
See the MjData reference for available fields.
- mujoco_toolbox.PROGRESS_BAR_ENABLED: bool¶
Show a progress bar during
Simulation.run.