Name | playground JSON |
Version |
0.0.3
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2025-01-19 02:07:37 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
dm_control
mjx
mujoco
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# MuJoCo Playground
![Banner for playground](https://github.com/google-deepmind/mujoco_playground/blob/main/assets/banner.png?raw=true)
A comprehensive suite of GPU-accelerated environments for robot learning research and sim-to-real, built with [MuJoCo MJX](https://github.com/google-deepmind/mujoco/tree/main/mjx).
Features include:
- Classic control environments from `dm_control` reimplemented in MJX.
- Quadruped and bipedal locomotion environments.
- Non-prehensile and dexterous manipulation environments.
- Vision-based support available via [Madrona-MJX](https://github.com/shacklettbp/madrona_mjx).
For more details, check out the project [website](https://playground.mujoco.org/).
## Installation
You can install MuJoCo Playground directly from PyPI:
```sh
pip install playground
```
### From Source
> [!IMPORTANT]
> Requires Python 3.10 or later.
1. `pip install -U "jax[cuda12]"`
* Verify GPU backend: python -c "import jax; print(jax.default_backend())" should print gpu
2. `git clone git@github.com:google-deepmind/mujoco_playground.git`
3. `cd mujoco_playground`
4. `uv pip install -e ".[all]"`
#### Madrona-MJX (optional)
For vision-based environments, please refer to the installation instructions in the [Madrona-MJX](https://github.com/shacklettbp/madrona_mjx?tab=readme-ov-file#installation) repository.
## Getting started
To try out MuJoCo Playground locally on a simple locomotion environment, you can run the following:
```py
import jax
import jax.numpy as jp
from mujoco_playground import registry
env = registry.load('Go1JoystickFlatTerrain')
state = jax.jit(env.reset)(jax.random.PRNGKey(0))
print(state.obs)
state = jax.jit(env.step)(state, jp.zeros(env.action_size))
print(state.obs)
```
For detailed tutorials on using MuJoCo Playground, see:
1. [Intro. to the Playground with DM Control Suite](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/dm_control_suite.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/dm_control_suite.ipynb)
2. [Locomotion Environments](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/locomotion.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/locomotion.ipynb)
3. [Manipulation Environments](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/manipulation.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/manipulation.ipynb)
For tutorials on MuJoCo Playground with Madrona-MJX batch rendering, we offer two types of colabs. The first allows you to install Madrona-MJX directly in a GPU colab instance and run vision-based cartpole!
1. [Training CartPole from Vision](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_1_t4.ipynb) on a Colab T4 Instance [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_1_t4.ipynb)
Two additional colabs require local runtimes with Madrona-MJX installed locally (see [Madrona-MJX](https://github.com/shacklettbp/madrona_mjx?tab=readme-ov-file#installation) for installation instructions):
1. [Training CartPole from Vision (Local Runtime)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_1.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_1.ipynb)
2. [Robotic Manipulation from Vision (Local Runtime)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_2.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_2.ipynb)
## How can I contribute?
Get started by installing the library and exploring its features! Found a bug? Report it in the issue tracker. Interested in contributing? If you’re a developer with robotics experience, we’d love your help—check out the [contribution guidelines](CONTRIBUTING.md) for more details.
## Citation
If you use Playground in your scientific works, please cite it as follows:
```bibtex
@misc{mujoco_playground_2025,
title = {MuJoCo Playground: An open-source framework for GPU-accelerated robot learning and sim-to-real transfer.},
author = {Zakka, Kevin and Tabanpour, Baruch and Liao, Qiayuan and Haiderbhai, Mustafa and Holt, Samuel and Luo, Jing Yuan and Allshire, Arthur and Frey, Erik and Sreenath, Koushil and Kahrs, Lueder A. and Sferrazza, Carlo and Tassa, Yuval and Abbeel, Pieter},
year = {2025},
publisher = {GitHub},
url = {https://github.com/google-deepmind/mujoco_playground}
}
```
## License and Disclaimer
The texture used in the rough terrain for the locomotion environments is from [Polyhaven](https://polyhaven.com/a/rock_face) and licensed under [CC0](https://creativecommons.org/public-domain/cc0/).
All other content in this repository is licensed under the Apache License, Version 2.0. A copy of this license is provided in the top-level [LICENSE](LICENSE) file in this repository. You can also obtain it from https://www.apache.org/licenses/LICENSE-2.0.
This is not an officially supported Google product.
Raw data
{
"_id": null,
"home_page": null,
"name": "playground",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "dm_control, mjx, mujoco",
"author": null,
"author_email": "Google DeepMind <mujoco@deepmind.com>",
"download_url": "https://files.pythonhosted.org/packages/b9/37/2ffe5020c1f1c997a576e1d5b75ac5fb83e54e01a2003da35fe0ff4379cc/playground-0.0.3.tar.gz",
"platform": null,
"description": "# MuJoCo Playground\n\n![Banner for playground](https://github.com/google-deepmind/mujoco_playground/blob/main/assets/banner.png?raw=true)\n\n\nA comprehensive suite of GPU-accelerated environments for robot learning research and sim-to-real, built with [MuJoCo MJX](https://github.com/google-deepmind/mujoco/tree/main/mjx).\n\nFeatures include:\n\n- Classic control environments from `dm_control` reimplemented in MJX.\n- Quadruped and bipedal locomotion environments.\n- Non-prehensile and dexterous manipulation environments.\n- Vision-based support available via [Madrona-MJX](https://github.com/shacklettbp/madrona_mjx).\n\nFor more details, check out the project [website](https://playground.mujoco.org/).\n\n## Installation\n\nYou can install MuJoCo Playground directly from PyPI:\n\n```sh\npip install playground\n```\n\n### From Source\n\n> [!IMPORTANT]\n> Requires Python 3.10 or later.\n\n1. `pip install -U \"jax[cuda12]\"`\n * Verify GPU backend: python -c \"import jax; print(jax.default_backend())\" should print gpu\n2. `git clone git@github.com:google-deepmind/mujoco_playground.git`\n3. `cd mujoco_playground`\n4. `uv pip install -e \".[all]\"`\n\n#### Madrona-MJX (optional)\n\nFor vision-based environments, please refer to the installation instructions in the [Madrona-MJX](https://github.com/shacklettbp/madrona_mjx?tab=readme-ov-file#installation) repository.\n\n## Getting started\n\nTo try out MuJoCo Playground locally on a simple locomotion environment, you can run the following:\n\n```py\nimport jax\nimport jax.numpy as jp\nfrom mujoco_playground import registry\n\nenv = registry.load('Go1JoystickFlatTerrain')\nstate = jax.jit(env.reset)(jax.random.PRNGKey(0))\nprint(state.obs)\nstate = jax.jit(env.step)(state, jp.zeros(env.action_size))\nprint(state.obs)\n```\n\nFor detailed tutorials on using MuJoCo Playground, see:\n\n1. [Intro. to the Playground with DM Control Suite](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/dm_control_suite.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/dm_control_suite.ipynb)\n2. [Locomotion Environments](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/locomotion.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/locomotion.ipynb)\n3. [Manipulation Environments](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/manipulation.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/manipulation.ipynb)\n\nFor tutorials on MuJoCo Playground with Madrona-MJX batch rendering, we offer two types of colabs. The first allows you to install Madrona-MJX directly in a GPU colab instance and run vision-based cartpole!\n\n1. [Training CartPole from Vision](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_1_t4.ipynb) on a Colab T4 Instance [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_1_t4.ipynb)\n\nTwo additional colabs require local runtimes with Madrona-MJX installed locally (see [Madrona-MJX](https://github.com/shacklettbp/madrona_mjx?tab=readme-ov-file#installation) for installation instructions):\n\n1. [Training CartPole from Vision (Local Runtime)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_1.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_1.ipynb)\n2. [Robotic Manipulation from Vision (Local Runtime)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_2.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco_playground/blob/main/learning/notebooks/training_vision_2.ipynb)\n\n## How can I contribute?\n\nGet started by installing the library and exploring its features! Found a bug? Report it in the issue tracker. Interested in contributing? If you\u2019re a developer with robotics experience, we\u2019d love your help\u2014check out the [contribution guidelines](CONTRIBUTING.md) for more details.\n\n## Citation\n\nIf you use Playground in your scientific works, please cite it as follows:\n\n```bibtex\n@misc{mujoco_playground_2025,\n title = {MuJoCo Playground: An open-source framework for GPU-accelerated robot learning and sim-to-real transfer.},\n author = {Zakka, Kevin and Tabanpour, Baruch and Liao, Qiayuan and Haiderbhai, Mustafa and Holt, Samuel and Luo, Jing Yuan and Allshire, Arthur and Frey, Erik and Sreenath, Koushil and Kahrs, Lueder A. and Sferrazza, Carlo and Tassa, Yuval and Abbeel, Pieter},\n year = {2025},\n publisher = {GitHub},\n url = {https://github.com/google-deepmind/mujoco_playground}\n}\n```\n\n## License and Disclaimer\n\nThe texture used in the rough terrain for the locomotion environments is from [Polyhaven](https://polyhaven.com/a/rock_face) and licensed under [CC0](https://creativecommons.org/public-domain/cc0/).\n\nAll other content in this repository is licensed under the Apache License, Version 2.0. A copy of this license is provided in the top-level [LICENSE](LICENSE) file in this repository. You can also obtain it from https://www.apache.org/licenses/LICENSE-2.0.\n\nThis is not an officially supported Google product.\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.0.3",
"project_urls": null,
"split_keywords": [
"dm_control",
" mjx",
" mujoco"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "50c4dc80652481583fdb7e16ac8b79a58a70cfe26c116d60ee2d41053940b565",
"md5": "28f800a899c2a3a12a4d7f21867c79f2",
"sha256": "d4e54e0e79b435fb21bbc8edde4c3ccf75a858ba025f2768accef07c54521f5c"
},
"downloads": -1,
"filename": "playground-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "28f800a899c2a3a12a4d7f21867c79f2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 5638749,
"upload_time": "2025-01-19T02:07:32",
"upload_time_iso_8601": "2025-01-19T02:07:32.458094Z",
"url": "https://files.pythonhosted.org/packages/50/c4/dc80652481583fdb7e16ac8b79a58a70cfe26c116d60ee2d41053940b565/playground-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b9372ffe5020c1f1c997a576e1d5b75ac5fb83e54e01a2003da35fe0ff4379cc",
"md5": "c557d2889f5ea6729157bb24e2e80305",
"sha256": "31b0f6e4090fb14b13221bfbf476a652fe9b17cbd0b3ce92a6e2babcb88a3e3a"
},
"downloads": -1,
"filename": "playground-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "c557d2889f5ea6729157bb24e2e80305",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 5515457,
"upload_time": "2025-01-19T02:07:37",
"upload_time_iso_8601": "2025-01-19T02:07:37.158910Z",
"url": "https://files.pythonhosted.org/packages/b9/37/2ffe5020c1f1c997a576e1d5b75ac5fb83e54e01a2003da35fe0ff4379cc/playground-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-19 02:07:37",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "playground"
}