Skip to content

Techniksam/mujoco-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mujocohelper

Utility helpers for MuJoCo simulations in Python.

Features

  • A custom Renderer that extends mujoco.Renderer
  • Optional Matplotlib plot overlays on rendered frames
  • Simple MP4 recording via OpenCV

Installation

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"

Quick Start

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()

License

MIT. See LICENSE.

About

Utility helpers for MuJoCo simulations in Python.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages