← Open Source
iit-DLSLab

Quadruped-PyMPC

A model predictive controller for quadruped robots based on the single rigid body model and written in python. Gradient-based (acados) or Sampling-based (jax).

Model DevelopmentPhysical AIPython
Open on GitHub
Momentum
+1stars in 24 hours+0.2%
528
Stars
70
Forks
+2
This week
3
Contributors
Created 2024-03-15 · Updated 2026-10-16 · #6821 today
Top developers
giulioturrisiDanfoaEthanJia0627
README

Overview

This repo contains a model predictive controller based on the single rigid body model and written in Python. It comes in two flavours: gradient-based via acados or sampling-based via jax. The controller is tested on real robots and is compatible with Mujoco.

Features gradient-based mpc:

  • less than 5ms computation on an intel i7-13700H cpu
  • optional integrators for model mismatch
  • optional smoothing for the ground reaction forces
  • optional foothold optimization
  • optional real-time iteration or advanced-step real-time iteration
  • optional zero moment point/center of mass constraints
  • optional lyapunov-based criteria

Features sampling-based mpc:

  • 10000 parallel rollouts in less than 2ms on an nvidia 4050 mobile gpu!
  • optional step frequency adaptation for enhancing robustness
  • implements different strategies: random sampling, mppi, cemppi and ot-mpc
  • different control parametrizations: zero-order, linear splines or cubic splines (see mujoco-mpc)
  • optional control refinement via rollout gradient
  • optional high-frequency feedback gains via Feedback-MPPI

Real-world deployment via:

Supported robots:

  • GO2
  • A2
  • B2
  • GO1
  • Aliengo
  • Spot
  • Mini-Cheetah
  • HyqReal1
  • HyqReal2

Installation and Run

See here.

How to contribute

PRs are very welcome (search for TODO in the issue, or add what you like)!

Citing this work

If you find the work useful, please consider citing one of our works:

On the Benefits of GPU Sample-Based Stochastic Predictive Controllers for Legged Locomotion (IROS-2024):

@INPROCEEDINGS{turrisi2024sampling,
  author={Turrisi, Giulio and Modugno, Valerio and Amatucci, Lorenzo and Kanoulas, Dimitrios and Semini, Claudio},
  booktitle={2024 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)}, 
  title={On the Benefits of GPU Sample-Based Stochastic Predictive Controllers for Legged Locomotion}, 
  year={2024},
  pages={13757-13764},
  doi={10.1109/IROS58592.2024.10801698}}
](https://arxiv.org/abs/2605.02147)

Adaptive Non-Linear Centroidal MPC With Stability Guarantees for Robust Locomotion of Legged Robots (RAL-2025):

@ARTICLE{elobaid2025adaptivestablempc,
  author={Elobaid, Mohamed and Turrisi, Giulio and Rapetti, Lorenzo and Romualdi, Giulio and Dafarra, Stefano and Kawakami, Tomohiro and Chaki, Tomohiro and Yoshiike, Takahide and Semini, Claudio and Pucci, Daniele},
  journal={IEEE Robotics and Automation Letters}, 
  title={Adaptive Non-Linear Centroidal MPC With Stability Guarantees for Robust Locomotion of Legged Robots}, 
  year={2025},
  volume={10},
  number={3},
  pages={2806-2813},
  doi={10.1109/LRA.2025.3536296}}

Maintainer

This repository is maintained by Giulio Turrisi and Daniel Ordonez.

Nearby in the ranking
Similar items