Warning
When I wrote this I was a convex optimization NOOB! I know more know and want to revamp when I find time...
2022-09-20.13-51-06.mp4
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
nalgebra for matrix operations
splines for linear interpolation
osqp for a sparse QP solver
Bevy for visualization + lyon for path rendering
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
This repository was inspired by https://github.com/niwhsa9/mpc-trajectory-tracker