Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qhdwight/mpc-rs
Linear MPC (Model Predictive Control) Path Following
https://github.com/qhdwight/mpc-rs
control-systems mpc robotics rust rust-robotics
Last synced: 3 months ago
JSON representation
Linear MPC (Model Predictive Control) Path Following
- Host: GitHub
- URL: https://github.com/qhdwight/mpc-rs
- Owner: qhdwight
- Created: 2022-08-21T02:39:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-07T23:44:44.000Z (8 months ago)
- Last Synced: 2024-10-15T11:45:24.187Z (3 months ago)
- Topics: control-systems, mpc, robotics, rust, rust-robotics
- Language: Rust
- Homepage:
- Size: 50.8 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linear Model Predictive Control
### Demo
https://user-images.githubusercontent.com/20666629/191329146-cf487d34-716d-4843-b2ec-523a79885047.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](https://nalgebra.org/) for matrix operations
[splines](https://docs.rs/splines/latest/splines/) for linear interpolation
[osqp](https://docs.rs/osqp/latest/osqp/) for a sparse QP solver
[Bevy](https://bevyengine.org/) for visualization + [lyon](https://github.com/Nilirad/bevy_prototype_lyon) for path rendering
### Code
[controller.rs](./src/controller.rs) Linear MPC implementation, QP solver over horizon
[robot.rs](./src/robot.rs) Kinematic modeling of unicycle robot
[math.rs](./src/math.rs) Misc. features for [nalgebra](https://nalgebra.org/) since it is relatively new
### Acknowledgments
This repository was inspired by https://github.com/niwhsa9/mpc-trajectory-tracker