MyoSim
MyoSim is the MuJoCo musculoskeletal model library used by MyoSuite. It provides anatomically detailed XML models of the human arm, leg, torso, and hand, plus a Python package for loading and composing them.
Models
| Model | DoF | Muscles | Preview | Version |
|---|---|---|---|---|
| MyoLeg | 29 | 80 | stable | |
| MyoArm | 38 | 63 | stable | |
| MyoTorso (MyoBack) | 18 | 210 | stable | |
| MyoHand | 23 | 39 | stable | |
| MyoFullBody | 123 | 416 | stable | |
| MyoLeg26 | 18 | 26 | beta | |
| MyoFinger | 4 | 5 | legacy | |
| MyoElbow | 2 | 6 | legacy |
Legacy models ship in the pip package under myo_sim/models/legacy/ and load via registry names such as myoelbow, myofinger, and osl. They are maintained for backwards compatibility only — see myo_sim/models/legacy/README.md.
Buildable Models
The following registered models can be compiled with myo_sim.build.compose.build_model("<name>"):
myotorso— torso scaffold with torso muscles.myotorso_abdomen— simple abdomen scaffold.myotorso_arm_r— torso with the right arm only.myotorso_arms— torso with the right arm plus a mirrored-left arm.myoarm_r— passive anatomical torso scaffold with the right arm.myoarms— passive anatomical torso scaffold with mirrored arms.myohand_r— passive anatomical torso scaffold with the right hand derived from the pruned right arm.myohands— passive anatomical torso scaffold with right and mirrored-left hands derived from pruned arms.myolegs— passive anatomical torso scaffold with legs.myolegs26— passive anatomical torso scaffold with reduced-muscle legs and simplified kinematic chain.myolegs_abdomen— simple abdomen scaffold with legs.myofullbody— full body with torso, mirrored arms, and legs.
To generate compiled MuJoCo XML files for the primary composed assemblies, run:
uv run python -m myo_sim.build.compose --generate
This writes loadable XML files for myoarms, myotorso, myolegs, myolegs26, and myofullbody under myo_sim/models/. Treat these as generated snapshots for GUI viewing and compatibility; for source edits, update the component XML files and myo_sim/build/compose.py, then regenerate. Those downstream XMLs are not actively maintained.
Install
pip install git+https://github.com/MyoHub/myo_sim.git@dev
Note: the PyPI package myo-sim currently points to an older incompatible version.
Use the git install above until a new release is published.
Quickstart
import mujoco
import myo_sim
# Load a model by registry name
model, data = myo_sim.load("myolegs")
print(f"Joints: {model.njnt}, Muscles: {model.nu}")
# Or compose another registered model
model, data = myo_sim.load("myotorso")
# Legacy models (backwards compatibility)
model, data = myo_sim.load("myoelbow")
# Compose a full-body MjSpec model
from myo_sim.build.compose import build_model
model = build_model("myofullbody")
print(f"Full body — joints: {model.njnt}, muscles: {model.nu}")
Development
git clone https://github.com/MyoHub/myo_sim.git
cd myo_sim
uv sync --dev
uv run pytest tests/ -x -n auto --ignore=tests/test_equivalence.py
See CONTRIBUTING.md for the full contributor guide.
Citation
If you find this repository useful in your research, please cite the following works:
@misc{MyoSuite2022,
author = {Caggiano, Vittorio and Wang, Huawei and Durandau, Guillaume
and Sartori, Massimo and Kumar, Vikash},
title = {{MyoSuite}: A contact-rich simulation suite for musculoskeletal motor control},
year = {2022},
doi = {10.48550/ARXIV.2205.13600},
url = {https://arxiv.org/abs/2205.13600},
}
@article{Li2026MuscleMimic,
title={Towards Embodied AI with MuscleMimic: Unlocking full-body musculoskeletal motor learning at scale},
author={Li, Chengkun and Wang, Cheryl and Ziliotto, Bianca and Simos, Merkourios and Kovecses, Jozsef and Durandau, Guillaume and Mathis, Alexander},
journal={arXiv preprint arXiv:2603.25544},
year={2026}
}
License
Apache 2.0 — see LICENSE.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file myo_sim-0.2.1.tar.gz.
File metadata
- Download URL: myo_sim-0.2.1.tar.gz
- Upload date:
- Size: 15.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b461e98c476c65ca7d2effb47f6aaafb65935a90190b5e723f0df6030df3b40
|
|
| MD5 |
b970220edfd7cf8f137fefc7faf7ff18
|
|
| BLAKE2b-256 |
e0629c944918f9b7de284125e842350e8e76c66ceccdaebd54cca30ca3f40d72
|
Provenance
The following attestation bundles were made for myo_sim-0.2.1.tar.gz:
Publisher:
publish.yml on MyoHub/myo_sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
myo_sim-0.2.1.tar.gz -
Subject digest:
1b461e98c476c65ca7d2effb47f6aaafb65935a90190b5e723f0df6030df3b40 - Sigstore transparency entry: 2402754864
- Sigstore integration time:
-
Permalink:
MyoHub/myo_sim@33c89c2bde282553dde3f526768eb3bdcfaa7649 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MyoHub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@33c89c2bde282553dde3f526768eb3bdcfaa7649 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file myo_sim-0.2.1-py3-none-any.whl.
File metadata
- Download URL: myo_sim-0.2.1-py3-none-any.whl
- Upload date:
- Size: 15.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0920428088418e50ab9ba302985c521788f5e7fa9be862efe4d328c07124c20
|
|
| MD5 |
85f76249a1e5588832ebcc83b78dba2f
|
|
| BLAKE2b-256 |
289672166ba074be797969a79f8ccbea9d31afcc4deebbaeed931b9a1625192a
|
Provenance
The following attestation bundles were made for myo_sim-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on MyoHub/myo_sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
myo_sim-0.2.1-py3-none-any.whl -
Subject digest:
e0920428088418e50ab9ba302985c521788f5e7fa9be862efe4d328c07124c20 - Sigstore transparency entry: 2402754898
- Sigstore integration time:
-
Permalink:
MyoHub/myo_sim@33c89c2bde282553dde3f526768eb3bdcfaa7649 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MyoHub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@33c89c2bde282553dde3f526768eb3bdcfaa7649 -
Trigger Event:
workflow_dispatch
-
Statement type: