Skip to main content

MyoSim

CI License Python PyPI

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 Screenshot 2026-08-07 at 9 00 43 AM stable
MyoArm 38 63 myoarm_demo stable
MyoTorso (MyoBack) 18 210 stable
MyoHand 23 39 stable
MyoFullBody 123 416 stable
MyoLeg26 18 26 Screenshot 2026-08-07 at 8 56 17 AM 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.load_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 myo-sim

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_spec
model = build_spec("myofullbody").compile()
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.

Metadata

Release files for myo-sim 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for myo-sim 0.2.5
File Size Uploaded Provenance Actions
myo_sim-0.2.5.tar.gz 15.7 MB With provenance Details for myo_sim-0.2.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for myo-sim 0.2.5
File Interpreter ABI Platform Actions
myo_sim-0.2.5-py3-none-any.whl Python 3 none any Details for myo_sim-0.2.5-py3-none-any.whl

Total release size: 31.5 MB

Release files / myo_sim-0.2.5.tar.gz

Download URL myo_sim-0.2.5.tar.gz
Size 15.7 MB
Tags Source
SHA-256 checksum
How to use checksums
30b3d8c84ec346c05d163d34e3a3583101341e3b533faced35da52ffc68de725
BLAKE2b-256 checksum
How to use checksums
88f4ef6a46d87dd4b482c630065ff240eb4a296cb7d81daa5420893d6d8089b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / myo_sim-0.2.5-py3-none-any.whl

Download URL myo_sim-0.2.5-py3-none-any.whl
Size 15.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9bd9634350e020cc744cd0d0faa12fe68b24ea466922071dad6d443be4639a6a
BLAKE2b-256 checksum
How to use checksums
02bba9d62810443b95e7cfb31c88ea99728800166e04db6b9f918552190ca691
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for myo-sim 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for myo_sim-0.2.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page