Musculoskeletal environments simulated in MuJoCo
Project description
MyoSuite
is a collection of musculoskeletal environments and tasks simulated with the MuJoCo physics engine and wrapped in the OpenAI gym
API to enable the application of Machine Learning to bio-mechanic control problems.
Documentation | Tutorials | Task specifications
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 and to create a separate environment with:
conda create --name myosuite python=3.8
conda activate myosuite
It is possible to install MyoSuite with:
pip install -U myosuite
for advanced installation, see here.
Test your installation using the following command (this will return also a list of all the current environments):
python -m myosuite.tests.test_myo
You can also visualize the environments with random controls using the command below:
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
:
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:
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:
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 on the general features and the ICRA2023 Colab Tutorial ICRA2024 Colab Tutorial on how to load MyoSuite models/tasks, train them, and visualize their outcome. Also, you can find baselines to test some pre-trained policies.
License
MyoSuite is licensed under the Apache License.
Citation
If you find this repository useful in your research, please consider giving a star ⭐ and cite our arXiv paper by using the following BibTeX entrys.
@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},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file MyoSuite-2.8.4.tar.gz
.
File metadata
- Download URL: MyoSuite-2.8.4.tar.gz
- Upload date:
- Size: 85.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acfe5c66cdd5868c362c46e9307e94ecbff815ae7d1bedc8560cf17502bd8e7d |
|
MD5 | 84b4ffd32a7d125f068de186f492fae3 |
|
BLAKE2b-256 | 5852ffb2ee574eba56c4badfbdd4cd7061f0a57e14e2ade41e6afd390635b1c2 |
File details
Details for the file MyoSuite-2.8.4-py3-none-any.whl
.
File metadata
- Download URL: MyoSuite-2.8.4-py3-none-any.whl
- Upload date:
- Size: 85.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b848da8406a294c895c000f51a8c7b7e5654ceddaee0cb07aa562f4fbb30d2a |
|
MD5 | 98556268ab90ea7d4d6d49746a105764 |
|
BLAKE2b-256 | 0c5fce3f9f57eaa7202c131a217321b836189740781942274f78ff7f6ce11f97 |