Skip to content

upkie/mpc_balancer

Repository files navigation

MPC balancer

The MPC balancer allows Upkie to stand upright, balancing with its wheels only, by closed-loop model predictive control. It performs better than the demo PID balancer with significantly less hacks ;-)

Installation

From Conda

conda create -f environment.yaml
conda activate mpc_balancer

From PyPI

pip install upkie[mpc_balancer]

This instruction works on both your dev machine and the robot's Raspberry Pi.

Simulation

To test the agent in simulation, run the Bullet spine, then start the agent:

make run_locally

Real robot

To run this agent on a real Upkie, you can use the Makefile at the root of the repository:

$ make build
$ make upload
$ ssh your-upkie
user@your-upkie:~$ make run_with_python