https://github.com/MyoHub/myosuite
MyoSuite is a collection of environments/tasks to be solved by musculoskeletal models simulated with the MuJoCo physics engine and wrapped in the OpenAI gym API.
https://github.com/MyoHub/myosuite
machine-learning motor-control mujoco musculoskeletal
Last synced: 5 months ago
JSON representation
MyoSuite is a collection of environments/tasks to be solved by musculoskeletal models simulated with the MuJoCo physics engine and wrapped in the OpenAI gym API.
- Host: GitHub
- URL: https://github.com/MyoHub/myosuite
- Owner: MyoHub
- License: apache-2.0
- Created: 2021-11-17T14:34:44.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-30T09:57:37.000Z (5 months ago)
- Last Synced: 2025-04-30T11:42:07.282Z (5 months ago)
- Topics: machine-learning, motor-control, mujoco, musculoskeletal
- Language: Python
- Homepage: https://sites.google.com/view/myosuite
- Size: 330 MB
- Stars: 930
- Watchers: 27
- Forks: 127
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://opensource.facebook.com/support-ukraine)
[](https://pypi.org/project/MyoSuite/)
[](https://myosuite.readthedocs.io/en/latest/)

[](https://github.com/myohub/myosuite/blob/main/docs/CONTRIBUTING.md)
[](https://pepy.tech/project/myosuite)
[](https://colab.research.google.com/drive/1zFuNLsrmx42vT4oV8RbnEWtkSJ1xajEo)
[](https://join.slack.com/t/myosuite/shared_invite/zt-1zkpw2zzk-NhVhVlSDxhoMHbzROD8gMA)
[](https://twitter.com/MyoSuite)`MyoSuite` is a collection of musculoskeletal environments and tasks simulated with the [MuJoCo](http://www.mujoco.org/) physics engine and wrapped in the OpenAI ``gym`` API to enable the application of Machine Learning to bio-mechanic control problems.
[Documentation](https://myosuite.readthedocs.io/en/latest/) | [Tutorials](https://github.com/myohub/myosuite/tree/main/docs/source/tutorials) | [Task specifications](https://github.com/myohub/myosuite/blob/main/docs/source/suite.rst#tasks)
Below is an overview of the tasks in the MyoSuite.
## Installations
You will need Python 3.8 or later versions.It is recommended to use [Miniconda](https://docs.conda.io/en/latest/miniconda.html#latest-miniconda-installer-links) and to create a separate environment with:
``` bash
conda create --name myosuite python=3.8
conda activate myosuite
```It is possible to install MyoSuite with:
``` bash
pip install -U myosuite
```
for advanced installation, see [here](https://myosuite.readthedocs.io/en/latest/install.html#alternative-installing-from-source).Test your installation using the following command (this will return also a list of all the current environments):
``` bash
python -m myosuite.tests.test_myo
```You can also visualize the environments with random controls using the command below:
``` bash
python -m myosuite.utils.examine_env --env_name myoElbowPose1D6MRandom-v0
```
**NOTE:** On MacOS, we moved to mujoco native `launch_passive` which requires that the Python script be run under `mjpython`:
``` bash
mjpython -m myosuite.utils.examine_env --env_name myoElbowPose1D6MRandom-v0
```It is possible to take advantage of the latest MyoSkeleton. Once added (follow the instructions prompted by `python -m myosuite_init`), run:
``` bash
python -m myosuite.utils.examine_sim -s myosuite/simhive/myo_model/myoskeleton/myoskeleton.xml
```## Examples
It is possible to create and interface with MyoSuite environments just like any other OpenAI gym environments. For example, to use the `myoElbowPose1D6MRandom-v0` environment, it is possible simply to run: [](https://colab.research.google.com/drive/1zFuNLsrmx42vT4oV8RbnEWtkSJ1xajEo)```python
from myosuite.utils import gym
env = gym.make('myoElbowPose1D6MRandom-v0')
env.reset()
for _ in range(1000):
env.mj_render()
env.step(env.action_space.sample()) # take a random action
env.close()
```You can find our [tutorials](https://github.com/myohub/myosuite/tree/main/docs/source/tutorials#tutorials) on the general features and the **ICRA2023 Colab Tutorial** [](https://colab.research.google.com/drive/1KGqZgSYgKXF-vaYC33GR9llDsIW9Rp-q) **ICRA2024 Colab Tutorial** [](https://colab.research.google.com/drive/1JwxE7o6Z3bqCT4ewELacJ-Z1SV8xFhKK#scrollTo=QDppGIzHB9Zu)
on how to load MyoSuite models/tasks, train them, and visualize their outcome. Also, you can find [baselines](https://github.com/myohub/myosuite/tree/main/myosuite/agents) to test some pre-trained policies.## License
MyoSuite is licensed under the [Apache License](LICENSE).
## Citation
If you find this repository useful in your research, please consider giving a star ⭐ and cite our [arXiv paper](https://arxiv.org/abs/2205.13600) by using the following BibTeX entrys.
```BibTeX
@Misc{MyoSuite2022,
author = {Vittorio, Caggiano AND Huawei, Wang AND Guillaume, Durandau AND Massimo, Sartori AND Vikash, Kumar},
title = {MyoSuite -- A contact-rich simulation suite for musculoskeletal motor control},
publisher = {arXiv},
year = {2022},
howpublished = {\url{https://github.com/myohub/myosuite}},
year = {2022}
doi = {10.48550/ARXIV.2205.13600},
url = {https://arxiv.org/abs/2205.13600},
}
```