Go to file
mcarfagno 31ca324a26 fixed equations spacing in notebook, updated gitignore 2020-04-07 16:51:12 +01:00
.ipynb_checkpoints Updated LATEX equations in notebook 2020-04-07 16:45:11 +01:00
img Updated README.md 2020-03-04 12:32:29 +00:00
mpc_demo Updated LATEX equations in notebook 2020-04-07 16:45:11 +01:00
notebook fixed equations spacing in notebook, updated gitignore 2020-04-07 16:51:12 +01:00
.gitignore fixed equations spacing in notebook, updated gitignore 2020-04-07 16:51:12 +01:00
README.md Updated LATEX equations in notebook 2020-04-07 16:45:11 +01:00
requirements.txt Updated README.md 2020-03-04 12:32:29 +00:00

README.md

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:

min J(x(t),U) = \sum^{t+T-1}_{j=t} (x_{j,ref} - x_{j})^T_{j}Q(x_{j,ref} - x_{j}) + u^T_{j}Ru_{j}

s.t.

x(0) = x0

x_{j+1} = Ax_{j}+Bu_{j}) for t< j <t+T-1

U_{MIN} < u_{j} < U_{MAX} for t< j <t+T-1

The vehicle dynamics are described by the differential drive model:

  • \dot{x} = v\cos{\theta}
  • \dot{y} = v\sin{\theta}
  • \dot{\theta} = w

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

To run the demo:

python3 mpc_demo/main.py

Requirements

pip3 install --user --requirement requirements.txt