Utility helpers for MuJoCo simulations in Python.
- A custom
Rendererthat extendsmujoco.Renderer - Optional Matplotlib plot overlays on rendered frames
- Simple MP4 recording via OpenCV
Install directly from the repository via pip + git:
pip install "git+https://github.com/Techniksam/mujocohelper.git"Install a specific tag or branch:
pip install "git+https://github.com/Techniksam/mujocohelper.git@v0.1.0"import mujoco
from mujocohelper import Renderer
model = mujoco.MjModel.from_xml_path("model.xml")
data = mujoco.MjData(model)
with Renderer(model, height=480, width=640) as renderer:
renderer.init_video("simulation.mp4", framerate=30)
for _ in range(300):
mujoco.mj_step(model, data)
renderer.update_scene(data)
renderer.render_frame()MIT. See LICENSE.