mujoco-toolbox

A Modern Simulation Wrapper for Google DeepMind’s MuJoCo

https://github.com/mgross21/mujoco-toolbox

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords

mujoco physics-simulation python wrapper-library
Last synced: 4 months ago · JSON representation ·

Repository

A Modern Simulation Wrapper for Google DeepMind’s MuJoCo

Basic Info
Statistics
  • Stars: 8
  • Watchers: 1
  • Forks: 0
  • Open Issues: 8
  • Releases: 21
Topics
mujoco physics-simulation python wrapper-library
Created about 1 year ago · Last pushed 5 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md


Python License Downloads

<!-- Row 2: Build/CI status --> Build PyPI Docs

A Modern Simulation Wrapper for Google DeepMind’s MuJoCo

⚠️ WARNING
This package is currently in its zero-release stage. Class methods and APIs may change without prior notice. Please review the documentation and changelog after each update to stay informed about any modifications.

Installation

Add -U flag to upgrade pre-existing library

PyPI Package

PyPI version

bash pip install mujoco-toolbox

GitHub Package

GitHub release

bash pip install git+https://github.com/MGross21/mujoco-toolbox.git@main

Adding to Project Dependencies

Click to Expand
Place the following in your `requirements.txt` or `pyproject.toml` file. ### PyPI Expect less frequent, stable releases. ``` mujoco-toolbox ``` ### Github Expect frequent rolling releases. ``` git+https://github.com/MGross21/mujoco-toolbox.git@main#egg=mujoco-toolbox ```

Extra Packages

FFMPEG
*Required for [mediapy](https://google.github.io/mediapy/mediapy.html) dependency* **Windows** ```bash winget install ffmpeg ffmpeg -version ``` **Linux** *Debian/Ubuntu* ```bash sudo apt update && sudo apt install ffmpeg ffmpeg -version ``` *Arch Linux* ```bash sudo pacman -Syu ffmpeg ffmpeg -version ``` **MacOS** *Using Homebrew* ```bash brew install ffmpeg ffmpeg -version ``` *Using MacPorts* ```bash sudo port install ffmpeg ffmpeg -version ```

Example Script

Bare minimum to run MuJoCo simulation and display result

```python import mujoco_toolbox as mjtb

mjtb.Simulation("path/to/your/xml").run(render=True).save() ```

Controllers

Pre-Made Controllers

The following controllers are available out-of-the-box:

  • sin
  • cos
  • step
  • random
  • real_time (recommended controller for digital twins)

You can import them as follows:

python import mujoco_toolbox.controllers as ctrl

Custom

```python

def foo(model: MjModel, data: MjData,**kwargs): # Perform logic based on model/data objects # ie. PID Controller ```

Instantiating a Digital Twin

```python import mujocotoolbox as mjtb from mujocotoolbox.controllers import real_time

with mjtb.Simulation("path/to/xml", controller=realtime) as digitaltwin: digitaltwin.launch(showmenu=False) # Open the simulation window while True: digitaltwin.controller(digitaltwin.model, digitaltwin.data, {"mjdata_kwargs": value}) ```

See MjData objects here

File Support

XML / MJCF (Native)

```python import mujoco_toolbox as mjtb

mjtb.Simulation("path/to/xml").show() ```

UR5/Vention

URDF

```python import mujoco_toolbox as mjtb

mjtb.Simulation("path/to/urdf", meshdir="path/to/mesh/files").show() # supports *.stl or *.obj ```

UR5

Merging Capabilities

Supports full <mujoco>...</mujoco> and <robot>...</robot> structure as well as complete sub-tree structures.

```python import mujoco_toolbox as mjtb

Merges: XML & URDF Files, XML & URDF Strings, Sub Tree Structures

mjtb.Simulation("path/to/xml1", stringxmlvar, ..., "path/to/xmln").show()

```

⚠️ WARNING
Duplicate sub-tree items with the same name will cause MuJoCo to throw a FatalError.

Humanoid in Box

Owner

  • Name: Michael Gross
  • Login: MGross21
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this project, please cite it using the following reference."
authors:
  - family-names: "Gross"
    given-names: "Michael"
title: "Mujoco Toolbox"
version: "0.6.3"
url: "https://github.com/MGross21/mujoco-toolbox"
date-released: "2024-10-15"
license: "MIT"
keywords:
  - "mujoco"
  - "physics-simulation"
  - "education-tool"
  - "robotics"
  - "python"
  - "wrapper"

GitHub Events

Total
  • Create event: 74
  • Commit comment event: 2
  • Release event: 31
  • Issues event: 24
  • Watch event: 7
  • Delete event: 53
  • Issue comment event: 16
  • Push event: 454
  • Pull request review comment event: 22
  • Pull request review event: 28
  • Pull request event: 80
Last Year
  • Create event: 74
  • Commit comment event: 2
  • Release event: 31
  • Issues event: 24
  • Watch event: 7
  • Delete event: 53
  • Issue comment event: 16
  • Push event: 454
  • Pull request review comment event: 22
  • Pull request review event: 28
  • Pull request event: 80

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 19
  • Total pull requests: 78
  • Average time to close issues: 29 days
  • Average time to close pull requests: about 9 hours
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 0.21
  • Average comments per pull request: 0.08
  • Merged pull requests: 68
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 19
  • Pull requests: 78
  • Average time to close issues: 29 days
  • Average time to close pull requests: about 9 hours
  • Issue authors: 3
  • Pull request authors: 3
  • Average comments per issue: 0.21
  • Average comments per pull request: 0.08
  • Merged pull requests: 68
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • MGross21 (17)
  • pbleedblue (1)
  • henrybon806 (1)
Pull Request Authors
  • MGross21 (70)
  • Copilot (6)
  • dependabot[bot] (2)
Top Labels
Issue Labels
bug (5) optimization (4) enhancement (3) python (3) help wanted (2) documentation (2) invalid (1) dependencies (1)
Pull Request Labels
documentation (8) enhancement (4) python (3) bug (2) dependencies (2) release (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 148 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 10
  • Total maintainers: 1
pypi.org: mujoco-toolbox

A Modern Simulation Wrapper for Google DeepMind's MuJoCo

  • Homepage: https://github.com/MGross21/mujoco-toolbox
  • Documentation: https://mgross21.github.io/mujoco-toolbox/
  • License: MIT License Copyright (c) 2025 Michael Gross Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.6.3
    published 5 months ago
  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 148 Last month
Rankings
Dependent packages count: 9.4%
Average: 31.2%
Dependent repos count: 53.0%
Maintainers (1)
Last synced: 5 months ago