![]() |
wb_humanoid_mpc repositoryai robotics optimization nonlinear planning data-generation mpc locomotion walking humanoid-robot humanoid wholebodycontrol |
|
![]() |
wb_humanoid_mpc repositoryai robotics optimization nonlinear planning data-generation mpc locomotion walking humanoid-robot humanoid wholebodycontrol |
|
![]() |
wb_humanoid_mpc repositoryai robotics optimization nonlinear planning data-generation mpc locomotion walking humanoid-robot humanoid wholebodycontrol |
|
![]() |
wb_humanoid_mpc repositoryai robotics optimization nonlinear planning data-generation mpc locomotion walking humanoid-robot humanoid wholebodycontrol |
|
![]() |
wb_humanoid_mpc repositoryai robotics optimization nonlinear planning data-generation mpc locomotion walking humanoid-robot humanoid wholebodycontrol humanoid_centroidal_mpc humanoid_centroidal_mpc_ros2 humanoid_common_mpc humanoid_common_mpc_pyutils humanoid_common_mpc_ros2 humanoid_mpc_msgs humanoid_wb_mpc humanoid_wb_mpc_ros2 remote_control mujoco_vendor g1_centroidal_mpc g1_description g1_wb_mpc |
|
Repository Summary
Description | Whole-Body Nonlinear MPC for Realtime Humanoid Loco-Manipulation Planning and Control |
Checkout URI | https://github.com/manumerous/wb_humanoid_mpc.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-06-05 |
Dev Status | UNKNOWN |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | ai robotics optimization nonlinear planning data-generation mpc locomotion walking humanoid-robot humanoid wholebodycontrol |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
humanoid_centroidal_mpc | 0.0.0 |
humanoid_centroidal_mpc_ros2 | 0.0.0 |
humanoid_common_mpc | 0.0.0 |
humanoid_common_mpc_pyutils | 0.0.0 |
humanoid_common_mpc_ros2 | 0.0.0 |
humanoid_mpc_msgs | 0.0.1 |
humanoid_wb_mpc | 0.0.0 |
humanoid_wb_mpc_ros2 | 0.0.0 |
remote_control | 0.0.0 |
mujoco_vendor | 1.0.0 |
g1_centroidal_mpc | 0.0.0 |
g1_description | 1.0.0 |
g1_wb_mpc | 0.0.0 |
README
Whole-Body Humanoid MPC
This repository contains a Whole-Body Nonlinear Model Predictive Controller (NMPC) for humanoid loco-manipulation control. This approach enables to directly optimize through the full-order torque-level dynamics in realtime to generate a wide range of humanoid behaviors building up on an extended & updated version of ocs2
Interactive Velocity and Base Height Control via Joystick:
It contains the following hardware platform agnostic MPC fromulations:
Centroidal Dynamics MPC
The centroidal MPC optimizes over the whole-body kinematics and the center off mass dynamics, with a choice to either use a single rigid body model or the full centroidal dynamics. This specific approach builds up on the centroidal model in ocs2 by generalizing costs and constraints to a 6 DoF contact among others. I am still working on documenting this. Until then a conscise explanation of the ocs2 centroidal model can be found here Sleiman et. al., A Unified MPC Framework for Whole-Body Dynamic Locomotion and Manipulation
Whole-Body Dynamics MPC
The whole-body dynamics MPC optimized over the contact forces and joint accelerations with the option to compute the joint torques for each step planned accross the horizon. I am still working on documenting and publishing the approach. The most relevant information on the choosen approach can currently be found in Galliker et al., Bipedal Locomotion with Nonlinear Model Predictive Control: Online Gait Generation using Whole-Body Dynamics
Robot Examples
The project supports the following robot examples:
- Unitree G1
- 1X Neo (Comming soon)
Get Started
Setup Colcon Workspace
Create a colcon workspace and clone the repository into the src folder:
mkdir -p humanoid_mpc_ws/src && cd humanoid_mpc_ws/src
git clone https://github.com/1x-technologies/wb-humanoid-mpc.git
Then initialize all submodules using:
cd wb-humanoid-mpc
git submodule update --init --recursive
Install Dependencies
The project supports both Dockerized workspaces (recommended) or a local installation for developing and running the humanoid MPC.
Dockerized Workspace
We provide a [Dockerfile](https://github.com/manumerous/wb_humanoid_mpc/blob/main/docker/Dockerfile) to enable running and devloping the project from a containerized environment. Check out the [devcontainer.json](https://github.com/manumerous/wb_humanoid_mpc/blob/main/.devcontainer/devcontainer.json) for the arguments that must be supplied to the `docker build` and `docker run` commands. For working in **Visual Studio Code**, we recommend to install the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension. Then, with the root of this repository as the root of your VS Code workspace, enter `Ctrl + Shift + P` and select `Dev Containers: Rebuild and Reopen in Container` at the top of the screen. VS Code will then automatically handle calling the `docker build` and `docker run` commands for you and will reopen the window at the root of the containerized workspace. Once this step is completed, you are ready to [build and run the code](https://github.com/manumerous/wb_humanoid_mpc/tree/main?tab=readme-ov-file#building-the-mpc).Install Dependencies Locally
Make sure you have **ros2** installed on your system as e.g specified for jazzy in the [installation guide](https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html). Then install all dependencies using: ```bash envsubst < dependencies.txt | xargs sudo apt install -y ```Building the MPC
make build-all
Running the examples
Once you run the NMPC a window with Rviz will appear for visualization. The first time you start the MPC for a certain robot model the auto differentiation code will be generated which might take up to 5-15 min depending on your system. Once done the robot appears and you can control it via an xbox gamepad or the controls in the terminal.
On the top level folder run:
For the Centroidal Dynamics MPC
make launch-g1-dummy-sim
For the Whole-Body Dynamics MPC
make launch-wb-g1-dummy-sim
Interactive Robot Control
Command a desired base velocity and root link height via Robot Base Controller GUI and XBox Controller Joystick. For the joystick it is easiest to directly connect via USB. Otherwise you need to install the required bluetooth Xbox controller drivers on your linux system. The GUI application automatically scanns for Joysticks and indicates whether one is connected.
Citing Whole-Body Humanoid MPC
To cite the Whole-Body Humanoid MPC in your academic research, please consider citing the following web BibTeX entry:
@misc{wholebodyhumanoidmpcweb,
author = {Manuel Yves Galliker},
title = {Whole-body Humanoid MPC: Realtime Physics-Based Procedural Loco-Manipulation Planning and Control},
howpublished = {https://github.com/1x-technologies/wb_humanoid_mpc},
year = {2024}
}
Acknowledgements
Created and actively maintained by Manuel Yves Galliker.
Special thanks go to Nicholas Palermo for implementing the dockerization among other great inputs and contributions.
This project is founded on the great work of many open-source contributors. I would especially like to acknowledge:
Part of this work was developed during my time at 1X Technologies. I would like to kindly thank Eric Jang and Bernt Børnich for supporting the open sourcing of this project.
Further I would like to thank Michael Purcell, Jesper Smith, Simon Zimmermann, Joel Filho, Paal Arthur Schjelderup Thorseth, Varit (Ohm) Vichathorn, Sjur Grønnevik Wroldsen, Armin Nurkanovic, Charles Khazoom and Farbod Farshidian for the many fruitful discussions, insights, contributions and support.
CONTRIBUTING
![]() |
wb_humanoid_mpc repositoryai robotics optimization nonlinear planning data-generation mpc locomotion walking humanoid-robot humanoid wholebodycontrol |
|
![]() |
wb_humanoid_mpc repositoryai robotics optimization nonlinear planning data-generation mpc locomotion walking humanoid-robot humanoid wholebodycontrol |
|
![]() |
wb_humanoid_mpc repositoryai robotics optimization nonlinear planning data-generation mpc locomotion walking humanoid-robot humanoid wholebodycontrol |
|
![]() |
wb_humanoid_mpc repositoryai robotics optimization nonlinear planning data-generation mpc locomotion walking humanoid-robot humanoid wholebodycontrol |
|