MyoSuite Documentation

repository·main·Indexed 22 days ago

https://github.com/myohub/myosuite

A collection of musculoskeletal environments and tasks simulated in MuJoCo and wrapped in the OpenAI gym API. It provides models for fingers, elbows, and hands to facilitate machine learning for bio-mechanic control. Features include accelerated MJX (MuJoCo XLA) and MJWarp implementations for high-speed training, MyoEdits for programmatic model manipulation via mjSpec, and non-stationarity variations to simulate sarcopenia, fatigue, and tendon-transfer.

Tokens
33K
Snippets
84
Records
129
Agent score
78%

What's inside MyoSuite

  1. What is MyoSuite?

    main
    MyoSuite is a collection of musculoskeletal environments and tasks simulated using the MuJoCo physics engine. It wraps these simulations in the OpenAI gym (Gymnasium) API, making it specifically designed for applying Machine Learning and Reinforcement Learning to bio-mechanic control problems.
  2. Overview of MyoChallenge competitions

    main

    MyoChallenge is an annual event organized by the MyoSuite team to advance the understanding of physiological motor control for dexterous and agile human movements. It utilizes the MyoSuite ecosystem, which provides a fast (>4000x faster) and contact-rich framework for musculoskeletal motor control.

    Past and current challenges include:

    • MyoChallenge 2022: Learning Physiological Dexterity: Focuses on learning contact-rich manipulation skills for a physiologically realistic musculo-skeletal hand.
    • MyoChallenge 2023: Towards Human-Level Dexterity and Agility: Focuses on the relationship between the nervous system and musculoskeletal structure to achieve human-level movement.
    • MyoChallenge 2024: Physiological Dexterity and Agility in Enhanced Humans: Focuses on symbiotic human-robotic interaction and the motor intelligence required for bionic prosthetic limb use and adaptability.
  3. Overview of MyoSuite models and tasks

    main

    MyoSuite provides a collection of musculoskeletal simulation tasks based on three core models:

    • Finger: Used for joint pose and fingertip reaching tasks.
    • Elbow: A simplified model (6 muscles) used for testing initial control schemes via elbow rotations.
    • Hand: A full forearm-wrist-hand model used for complex, contact-rich tasks like key turning, object holding, pen twirling, and baoding balls.

    Tasks range from simple reaching to highly dexterous movements requiring coordination and collision avoidance.

  4. Research projects using MyoSuite

    main

    Several research projects and publications leverage the MyoSuite framework for studying reinforcement learning and dexterous manipulation:

    • MyoDex: A generalizable prior for dexterous manipulation. Link
    • DEP-RL: Embodied Exploration for Reinforcement Learning in Overactuated and Musculoskeletal Systems. Link
    • Lattice: Latent Exploration for Reinforcement Learning. Link
    • SAR: Generalization of Physiological Agility and Dexterity via Synergistic Action Representation. Link

    If you have a project using MyoSuite, you can contribute by creating a Pull Request to include it in the documentation.

  5. Prosthesis Locomotion Challenge Overview

    main

    The Prosthesis Locomotion task involves a trans-femoral myoLeg model and an Open Source Leg (OSL) prosthetic. The goal is to learn the dynamics and control of a powered prosthetic leg to traverse different terrain types (Flat, Hilly, Rough, Stairs) with increasing difficulty.

    Key Constraints:

    • No Direct Control: You cannot directly observe or control the prosthetic leg's angles, velocities, or torques.
    • Interaction: Interaction with the prosthetic leg occurs via socket interaction forces on the residual limb (provided in observations).
    • Prosthetic Control: The prosthetic leg is controlled by an embedded state-machine-based impedance controller. Participants must update this controller's parameters to adapt to terrain.
  6. Understand the difference between TEST and EVALUATION environments

    main

    The MyoChallenge provides two distinct environment types:

    1. TEST environment: Open to participants for familiarization and development.
    2. EVALUATION environment: The final environment used for scoring.

    Note: While the tasks and evaluation criteria are identical, the distributions of changing factors may differ between TEST and EVALUATION. To ensure high performance, developers should focus on training policies that are robust across a wide range of distributions.

  7. myoHand model details

    main

    The myoHand is a complex musculoskeletal model for dexterous manipulation, comprising 29 bones, 23 joints, and 39 muscles-tendon units.

    Muscle Acronyms:

    • ECRL: Extensor Carpis Radialis Longus
    • ECRB: Extensor Carpis Radialis Brevis
    • ECU: Extensor Carpi Ulnaris
    • FCR: Flexor Carpi Radialis
    • FCU: Flexor Carpi Ulnaris
    • PL: Palmaris longus
    • PT: Pronator teres
    • PQ: Pronator
    • EIP: Extensor Indicis Proprius
    • EPL: Extensor Pollicis Longus
    • EPB: Extensor Pollicis Brevis
    • FPL: Flexor Pollicis Longus
    • APL: Abductor Pollicis Longus
    • OP: Opponens Pollicis
    • FDS: Flexor Digitorum Superficialis (2- index, 3- middle, 4- ring, 5- little)
    • FDP: Flexor Digitorum Profundus (2- index, 3- middle, 4- ring, 5- little)
    • EDC: Extensor Digitorum Communis (2- index, 3- middle, 4- ring, 5- little)
    • EDM: Extensor Digiti Minimi
    • RI: Radial Interosseous (2- index, 3- middle, 4- ring, 5- little)
    • LU-RB: Lumbrical (2- index, 3- middle, 4- ring, 5- little)
    • UI-UB: Palmar or Ulnar Interosseous (2- index, 3- middle, 4- ring, 5- little)
  8. Compare MJX and MJWarp performance

    main

    MyoSuite provides MJX and MJWarp implementations for accelerated training.

    • MJX (MuJoCo XLA): Provides significant acceleration (up to 35x) for environments like MjxElbowPoseRandom-v0 and MjxFingerPoseRandom-v0. However, performance gains may be lower (2-5x) in contact-rich environments like MjxHandReachRandom-v0.
    • MJWarp (MuJoCo Warp): Optimized for contact-rich environments. It consistently outperforms both MuJoCo and MJX, offering up to 100x speedup over MuJoCo and 5-20x speedup over MJX. Increasing the number of parallel environments consistently improves training time with Warp.

    Simulation/rollout speeds for MuJoCo Warp can reach 150K to 1M steps per second depending on the environment and parallelism.

  9. Table Tennis Rally Challenge Overview

    main

    The Table Tennis Rally challenge requires an agent to hit a pingpong ball with a paddle so that it lands on the opponent's side. This task necessitates the coordination of a myoArm model and a myoTorso model to achieve accurate hits and sufficient force for a high-speed rally.

    Objective: Develop a general policy to move the ball from the agent's side to the opposite side by hitting it with a paddle.

  10. Biological and assistive modeling variations

    main

    MyoSuite includes models for simulating physiological conditions and assistive technologies:

    • Sarcopenia: Modeled as a 50% reduction of maximal isometric force for each muscle.
    • Fatigue: A dynamic muscle fatigue model where a fatigue factor is applied to all muscles (simplified implementation).
    • Tendon Transfer: Simulates surgery by redirecting the application point of muscle forces from one joint DoF to another (e.g., moving EIP application from index to thumb).
    • Exoskeleton Assistance: Modeled for the elbow using an ideal actuator and two supports (upper arm: 0.101 Kg, forearm: 0.111 Kg). Assistance is provided as a percentage of biological joint torque.
  11. Apply IK trajectories to Myochallenge tasks

    main

    IK-generated trajectories can be used in Myochallenge to improve training efficiency or provide expert demonstrations:

    • Reference State Initialization: Collect trajectories that interpolate from distant poses to well-positioned states (e.g., a correctly positioned paddle). Starting episodes in these plausible poses makes control policy exploration more efficient.
    • Imitation Learning: Use the extracted IK trajectories as ground truth for motion tracking or imitation learning algorithms.
  12. Non-stationarity variations in MyoSuite environments

    main

    To study robustness and physiological changes, MyoSuite environments support several non-stationarity variations. These can be applied to various tasks to simulate different physiological conditions:

    • Sarcopenia: Simulated muscle loss/weakness.
    • Fatigue: Simulated muscle fatigue.
    • Tendon-transfer: Simulated surgical tendon transfers.

    Most tasks (Finger, Elbow, and Hand) support Sarcopenia and Fatigue, while the more complex Hand tasks also support Tendon-transfer variations.