Go to file
mcarfagno 385daab272 updated location of old notebooks 2020-10-22 21:43:47 +01:00
.ipynb_checkpoints updated README.md 2020-04-07 17:09:13 +01:00
img Added docstrings in utils functions 2020-10-06 10:13:11 +01:00
mpc_pybullet_demo updated location of old notebooks 2020-10-22 21:43:47 +01:00
notebooks updated location of old notebooks 2020-10-22 21:43:47 +01:00
.DS_Store updated location of old notebooks 2020-10-22 21:43:47 +01:00
.gitignore updated .gitignore 2020-10-22 21:33:54 +01:00
README.md f10 pybullet demo 2020-07-06 16:54:22 +01:00
requirements.txt Added obstacle avoidance 2020-06-29 15:31:43 +01:00

README.md

mpc_python

Python implementation of a mpc controller for path tracking using CVXPY.

About

The MPC is a model predictive path following controller which does follow a predefined reference by solving an optimization problem. The resulting optimization problem is shown in the following equation:

The terns of the cost function are the sum of the cross-track error, heading error, velocity error and actuaction effort.

Where R,P,K,Q are the cost matrices used to tune the response.

The vehicle model is described by the bicycle kinematics model using the state space matrices A and B:

The state variables (x) of the model are:

  • x coordinate of the robot
  • y coordinate of the robot
  • v velocuty of the robot
  • theta heading of the robot

The inputs (u) of the model are:

  • a linear acceleration of the robot
  • delta steering angle of the robot

Demo

The MPC implementation is tested using bullet physics simulator. Racing car model is from: https://github.com/erwincoumans/pybullet_robots.

Results:

To run the pybullet demo:

python3 mpc_demo/mpc_demo_pybullet.py

To run the simulation-less demo:

python3 mpc_demo/mpc_demo_pybullet.py

Requirements

pip3 install --user --requirement requirements.txt