mpc_python_learn/README.md

41 lines
827 B
Markdown
Raw Normal View History

2019-11-27 20:30:11 +08:00
# mpc_python
2020-03-04 20:32:29 +08:00
Python implementation of mpc controller for path tracking.
## About
The MPC is a model predictive path following controller which does follow a predefined reference path Xref and Yref by solving an optimization problem. The resulting optimization problem is shown in the following equation:
2020-04-08 00:05:36 +08:00
![](img/quicklatex1.gif)
2020-03-04 20:32:29 +08:00
The vehicle dynamics are described by the differential drive model:
2020-04-08 00:05:36 +08:00
![](img/quicklatex2.gif)
2020-03-04 20:32:29 +08:00
The state variables of the model are:
* $x$ coordinate of the robot
* $y$ coordinate of the robot
* $\theta$ heading of the robot
The inputs of the model are:
* $v$ linear velocity of the robot
* $w$ angular velocity of the robot
## Demo
![](img/demo.gif)
To run the demo:
```bash
python3 mpc_demo/main.py
```
## Requirements
```bash
pip3 install --user --requirement requirements.txt
```