Skip to content

Whole-Body Nonlinear MPC for Realtime Humanoid Loco-Manipulation Planning and Control

License

Notifications You must be signed in to change notification settings

manumerous/wb_humanoid_mpc

 
 

Repository files navigation

Whole-Body Humanoid MPC

This repository contains a Nonlinear Model Predictove Controller (NMPC) for humanoid loco-manipulation control. It contains a library of functionality and extends OCS2 to enable motion planning for humanoids.

Screencast2024-12-16180254-ezgif com-video-to-gif-converter(1)(3)

It contains functionality to allow the following MPC fromulations to be easily used for any humanoid robot.

Centroidal 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. It's functionality is contained in humanoid_centroidal_mpc.

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. It's functionality is contained in humanoid_wb_mpc.

Robot Examples

The project supports the following robot examples:

  • Unitree G1
  • 1X Neo (Comming soon)

Get Started

Setup 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

Install all aptitude dependencies using:

xargs -a dependencies.txt sudo apt install

Then install ros2 jazzy as specified in the installation guide.

As a final step:

sudo apt install ros-jazzy-ament-cmake-clang-format ros-jazzy-joint-state-publisher-gui ros-jazzy-xacro ros-jazzy-mcap-vendor ros-jazzy-interactive-markers

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 MPC

make launch-g1-dummy-sim

For the Whole-Body MPC

make launch-wb-g1-dummy-sim

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

This project was developed at 1X Technologies and is primarily authored and maintained by Manuel Yves Galliker.

Further acknoledgment for their contributions, insights, discussion and support goes to Michael Purcell, Jesper Smith, Simon Zimmermann, Joel Filho, Paal Arthur Schjelderup Thorseth, Varit (Ohm) Vichathorn, Armin Nurkanovic, Charles Khazoom, Farbod Farshidian, Eric Jang, Bernt Børnich and everyone at 1X Technologies.

About

Whole-Body Nonlinear MPC for Realtime Humanoid Loco-Manipulation Planning and Control

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 92.3%
  • Python 4.7%
  • CMake 2.4%
  • Makefile 0.6%