Official implementation of
Controlling high-dimensional nonlinear systems is challenging due to large state and action spaces.
- A sampling-based model predictive position controller for high-level posture planning
- A morphology-aware proportional controller that coordinates actuators using the system's Jacobian matrices
This enables stable control of a 700-actuator whole-body human musculoskeletal model (MS-Human-700) across diverse motion tasks — without any training. The method also generalizes to an ostrich musculoskeletal model (120 actuators) and an arm/hand model (85 actuators) for dexterous manipulation.
- CMake ≥ 3.16
- C++20 compiler (Clang 12+ or GCC 11+)
- Conda (recommended for dependencies)
git clone --recurse-submodules https://github.com/LNSGroup/MPC2.git
cd MPC2The
--recurse-submodulesflag is required to pull the MS-Human-700 and OstrichRL musculoskeletal models. If you already cloned without it, run:git submodule update --init --recursive
# Install OsqpEigen (required dependency)
conda install conda-forge::osqp-eigen
# Configure and build
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --target mjpc -j$(nproc)./build/bin/mjpc --task="Walk"Press +/- to adjust simulation speed. Default speed: 0.01× (for 32-core CPU).
All tasks use the MS-Human-700 full-body musculoskeletal model (700 muscle-tendon units) unless noted otherwise.
| Task | Description | Command |
|---|---|---|
| Stand | Maintain upright balance for 10 seconds on flat ground | --task="Stand" |
| Walk | Walk forward over flat terrain for 10 meters | --task="Walk" |
| Rough | Walk forward over rough terrain | --task="Rough" |
| Slope | Walk up and down inclined slopes | --task="Slope" |
| HandCube | Dexterous manipulation: rotate a cube to a target orientation using an arm/hand model (85 actuators) | --task="HandCube" |
| WalkOstrich | Walk forward using the ostrich musculoskeletal model (120 actuators) | --task="WalkOstrich" |
Tasks can be switched via the GUI task selector, or by passing the --task flag:
./build/bin/mjpc --task="Slope"The default startup task is set in mjpc/main.cc:
ABSL_FLAG(std::string, task, "Walk", "Which model to load on startup.");This repository uses two musculoskeletal models as git submodules:
| Model | Description | Source |
|---|---|---|
| MS-Human-700 | Whole-body human model: 90 bodies, 206 joints, 700 muscles | LNSGroup/MS-Human-700 |
| OstrichRL | Ostrich model: 56 joints, 120 muscles | vittorione94/ostrichrl |
To clone with submodules:
git clone --recurse-submodules https://github.com/LNSGroup/MPC2.git@inproceedings{
wei2025motion,
title={Motion Control of High-Dimensional Musculoskeletal Systems with Hierarchical Model-Based Planning},
author={Yunyue Wei and Shanning Zhuang and Vincent Zhuang and Yanan Sui},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://arxiv.org/abs/2505.08238}
}