Skip to content

Latest commit

 

History

History
35 lines (19 loc) · 1.2 KB

README.md

File metadata and controls

35 lines (19 loc) · 1.2 KB

Linear Model Predictive Control

Demo

2022-09-20.13-51-06.mp4

Idea

We can model our system and predict its state into the future. We can also model how our inputs affect this future state. Using a constraint solver such as QP, we can find a series of control inputs that minimizes error over a "horizon" or short time in the future.

See: https://web.stanford.edu/class/archive/ee/ee392m/ee392m.1056/Lecture14_MPC.pdf

Libraries

nalgebra for matrix operations

splines for linear interpolation

osqp for a sparse QP solver

Bevy for visualization + lyon for path rendering

Code

controller.rs Linear MPC implementation, QP solver over horizon

robot.rs Kinematic modeling of unicycle robot

math.rs Misc. features for nalgebra since it is relatively new

Acknowledgments

This repository was inspired by https://github.com/niwhsa9/mpc-trajectory-tracker