mpc_python_learn/.ipynb_checkpoints/README-checkpoint.md

41 lines
836 B
Markdown
Raw Normal View History

2020-04-07 23:45:11 +08:00
# mpc_python
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:09:13 +08:00
![](img/quicklatex1.png)
2020-04-07 23:45:11 +08:00
The vehicle dynamics are described by the differential drive model:
2020-04-08 00:09:13 +08:00
![](img/quicklatex2.png)
2020-04-07 23:45:11 +08:00
The state variables of the model are:
2020-04-08 00:09:13 +08:00
* **x** coordinate of the robot
* **y** coordinate of the robot
* **theta** heading of the robot
2020-04-07 23:45:11 +08:00
The inputs of the model are:
2020-04-08 00:09:13 +08:00
* **v** linear velocity of the robot
* **w** angular velocity of the robot
2020-04-07 23:45:11 +08:00
## Demo
![](img/demo.gif)
To run the demo:
```bash
python3 mpc_demo/main.py
```
## Requirements
```bash
pip3 install --user --requirement requirements.txt
```