// the find
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)
A Python model predictive controller for quadruped locomotion built on the single rigid body model, with two interchangeable backends: acados for gradient-based optimization and JAX for sampling-based control (random sampling, MPPI, CEM-MPPI). It suits legged-robotics researchers who want to compare the two approaches on the same dynamics, either in MuJoCo or on Unitree hardware through ROS 2.
- Both backends share one rigid body model, so a gradient-versus-sampling comparison is about the solver rather than the dynamics. That makes the repo more useful for controller research than a single-method demo.
- The gradient controllers are split into nominal, kinodynamic, Lyapunov, input-rate and collaborative variants under controllers/gradient, so each formulation can be read on its own. The README lists the acados options (RTI, advanced-step RTI, mismatch integrators, GRF smoothing, ZMP/CoM constraints) as optional features rather than hidden flags.
- The sampling side offers zero-order, linear-spline and cubic-spline input parametrizations, following the mujoco-mpc formulation. Keeping that reference link lets you check the implementation against a published design.
- The README connects the controller to a real deployment stack: muse for state estimation and unitree-ros2-dls for robot communication. It is more than a simulation-only project.
- Setup is the main cost. The README defers everything to README_install.md, and the installation folder has Docker files, mamba environments for two ROS 2 distros (Humble and Lyrical), and separate integrated-GPU and NVIDIA variants. Building acados and getting JAX working with CUDA both have their own friction, so expect the first working run to take a while.
- The performance numbers (under 5 ms on an i7-13700H, 10000 rollouts in under 2 ms on an RTX 4050 mobile) are the authors' figures on one laptop with no stated benchmark method, no baseline against another MPC, and no tracking-error results. They show a ceiling on that hardware, not what another robot will see.
- The single rigid body model ignores leg inertia and limb dynamics, which matters more on heavier or faster platforms. The README does not say at what speeds or payloads the model stops being accurate, or when to enable the optional mismatch integrators.