{"id":28387257,"url":"https://github.com/mgross21/mujoco-toolbox","last_synced_at":"2025-06-26T19:32:28.489Z","repository":{"id":266586004,"uuid":"898761925","full_name":"MGross21/mujoco-toolbox","owner":"MGross21","description":"A Modern Simulation Wrapper for Google DeepMind’s MuJoCo","archived":false,"fork":false,"pushed_at":"2025-06-02T08:45:24.000Z","size":14184,"stargazers_count":8,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T11:25:02.997Z","etag":null,"topics":["mujoco","physics-simulation","python","wrapper-library"],"latest_commit_sha":null,"homepage":"https://mgross21.github.io/mujoco-toolbox/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MGross21.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-05T01:37:17.000Z","updated_at":"2025-06-02T08:45:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b8c63b6-a161-4945-9ae7-8f187e0a2ec0","html_url":"https://github.com/MGross21/mujoco-toolbox","commit_stats":null,"previous_names":["mgross21/mujocohandler","mgross21/mjwrapper","mgross21/mujoco-toolbox"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/MGross21/mujoco-toolbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGross21%2Fmujoco-toolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGross21%2Fmujoco-toolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGross21%2Fmujoco-toolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGross21%2Fmujoco-toolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MGross21","download_url":"https://codeload.github.com/MGross21/mujoco-toolbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGross21%2Fmujoco-toolbox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262132565,"owners_count":23264022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mujoco","physics-simulation","python","wrapper-library"],"created_at":"2025-05-30T16:40:11.294Z","updated_at":"2025-06-26T19:32:28.472Z","avatar_url":"https://github.com/MGross21.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/MGross21/mujoco-toolbox/main/assets/images/mjtb_logo_transparent.png\" width=\"400\"\u003e\n\u003c/h1\u003e\u003cbr\u003e\n\n![Build](https://github.com/MGross21/mujoco-toolbox/actions/workflows/ci.yml/badge.svg)\n![Python](https://img.shields.io/badge/python-3.9%20|%203.10%20|%203.11%20|%203.12%20|%203.13-blue)\n![License](https://img.shields.io/github/license/MGross21/mujoco-toolbox)\n[![PyPI](https://github.com/MGross21/mujoco-toolbox/actions/workflows/publish.yml/badge.svg)](https://github.com/MGross21/mujoco-toolbox/actions/workflows/publish.yml)\n[![Docs](https://github.com/MGross21/mujoco-toolbox/actions/workflows/docs.yml/badge.svg)](https://github.com/MGross21/mujoco-toolbox/actions/workflows/docs.yml)\n\nA Modern Simulation Wrapper for Google DeepMind’s MuJoCo\n\n\u003e **⚠️ WARNING**  \n\u003e 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.\n\n## Installation\n\n*Add `-U` flag to upgrade pre-existing library*\n\n### PyPI Package\n\n[![PyPI version](https://img.shields.io/pypi/v/mujoco-toolbox?labelColor=333333\u0026color=%23800080)](https://pypi.org/project/mujoco-toolbox/)\n\n```bash\npip install mujoco-toolbox\n```\n\n### GitHub Package\n\n[![GitHub release](https://img.shields.io/github/v/release/MGross21/mujoco-toolbox?label=github\u0026labelColor=333333\u0026color=%23800080)](https://github.com/MGross21/mujoco-toolbox/releases)\n\n```bash\npip install git+https://github.com/MGross21/mujoco-toolbox.git@main\n```\n\n\n### Adding to Project Dependencies\n\u003cdetails\u003e\n\n\u003csummary\u003e\u003cb\u003eClick to Expand\u003c/b\u003e\u003c/summary\u003e\u003cbr\u003e\n\n\nPlace the following in your `requirements.txt` or `pyproject.toml` file.\n\n### PyPI\n\nExpect less frequent, stable releases.\n\n```\nmujoco-toolbox\n```\n\n### Github\n\nExpect frequent rolling releases.\n\n```\ngit+https://github.com/MGross21/mujoco-toolbox.git@main#egg=mujoco-toolbox\n```\n\n\u003c/details\u003e\n\n## Extra Packages\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eFFMPEG\u003c/b\u003e\u003c/summary\u003e\n\n\u003c/br\u003e\n\n*Required for [mediapy](https://google.github.io/mediapy/mediapy.html) dependency*\n\n**Windows**\n\n```bash\nwinget install ffmpeg\nffmpeg -version\n```\n\n**Linux**\n\n*Debian/Ubuntu*\n\n```bash\nsudo apt update \u0026\u0026 sudo apt install ffmpeg\nffmpeg -version\n```\n\n*Arch Linux*\n\n```bash\nsudo pacman -Syu ffmpeg\nffmpeg -version\n```\n\n**MacOS**\n\n*Using Homebrew*\n\n```bash\nbrew install ffmpeg\nffmpeg -version\n```\n\n*Using MacPorts*\n\n```bash\nsudo port install ffmpeg\nffmpeg -version\n```\n\n\u003c/details\u003e\n\n## Example Script\n\n*Bare minimum to run MuJoCo simulation and display result*\n\n```python\nimport mujoco_toolbox as mjtb\n\nmjtb.Simulation(\"path/to/your/xml\").run(render=True).save()\n```\n\n## Controllers\n\n### Pre-Made Controllers\n\nThe following controllers are available out-of-the-box:\n\n- `sin`\n- `cos`\n- `step`\n- `random`\n- `real_time` \u003csub\u003e(recommended controller for digital twins)\u003c/sub\u003e\n\nYou can import them as follows:\n\n```python\nimport mujoco_toolbox.controllers as ctrl\n```\n\n### Custom\n\n```python\n\ndef foo(model: MjModel, data: MjData,**kwargs):\n    # Perform logic based on model/data objects\n    # ie. PID Controller\n```\n\n## Instantiating a Digital Twin\n\n```python\nimport mujoco_toolbox as mjtb\nfrom mujoco_toolbox.controllers import real_time\n\nwith mjtb.Simulation(\"path/to/xml\", controller=real_time) as digitaltwin:\n    digitaltwin.launch(show_menu=False) # Open the simulation window\n    while True:\n        digitaltwin.controller(digitaltwin.model, digitaltwin.data, {\"mjdata_kwargs\": value})\n```\n\nSee `MjData` objects [here](https://mujoco.readthedocs.io/en/stable/APIreference/APItypes.html#mjdata)\n\n## File Support\n\n### XML / MJCF (Native)\n\n```python\nimport mujoco_toolbox as mjtb\n\nmjtb.Simulation(\"path/to/xml\").show()\n```\n\n\u003cimg src=\"https://raw.githubusercontent.com/MGross21/mujoco-toolbox/main/assets/images/ur5_vention.png\" alt=\"UR5/Vention\" width=\"300\"\u003e\n\n### URDF\n\n```python\nimport mujoco_toolbox as mjtb\n\nmjtb.Simulation(\"path/to/urdf\", meshdir=\"path/to/mesh/files\").show()  # supports *.stl or *.obj\n```\n\n\u003cimg src=\"https://raw.githubusercontent.com/MGross21/mujoco-toolbox/main/assets/images/ur5_render_no_gui.png\" alt=\"UR5\" width=\"300\"\u003e\n\n## Merging Capabilities\n\nSupports full `\u003cmujoco\u003e...\u003c/mujoco\u003e` and `\u003crobot\u003e...\u003c/robot\u003e` structure as well as complete sub-tree structures.\n\n```python\nimport mujoco_toolbox as mjtb\n\n# Merges: XML \u0026 URDF Files, XML \u0026 URDF Strings, Sub Tree Structures\nmjtb.Simulation(\"path/to/xml_1\", string_xml_var, ..., \"path/to/xml_n\").show()\n\n```\n\n\u003e **⚠️ WARNING**  \n\u003e Duplicate sub-tree items with the same name will cause MuJoCo to throw a `FatalError`.\n\n\u003cimg src=\"https://raw.githubusercontent.com/MGross21/mujoco-toolbox/main/assets/images/human_in_box.png\" alt=\"Humanoid in Box\" width=\"300\"\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgross21%2Fmujoco-toolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgross21%2Fmujoco-toolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgross21%2Fmujoco-toolbox/lists"}