Skip to content

Simple library to simulate, test and tune Model Predictive Control (MPC) for autonomous vehicles.

License

Notifications You must be signed in to change notification settings

vTechSavyy/vehicle-mpc-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vehicle-mpc-controller

  • Library for simulating, testing and tuning a Model Predictive Controller (MPC) for autonomous vehicles.
  • Currently the code uses either a unicycle or bicycle model (with ackermann steering) to model the dyanmics of the vehicle.
  • The objective of the controller is to track a given reference trajectory in the presence of added process noise.
  • The non-linear dynamics of the system are linearized about the reference trajectory.
  • The MPC problem for the linearized system is then cast as a constrained Quadratic Programming (QP) problem.
  • The constrained QP problem is solved using the OSQP optimization library and its C++/Eigen wrapper

Dependencies

Third-party software used:

Building

Linux

git clone https://github.com/vTechSavyy/vehicle-mpc-controller.git
cd vehicle-mpc-controller
mkdir build && cd build
cmake ../
make

Running an example:

./mpc-bicycle-double-lane-change

The params of the simualtion and mpc-controller are set through a json file in the params folder

Results

Bicycle model - Lane change maneuver

bicycle model lane change

Bicycle model - Double lane change maneuver

bicycle model double lane change

References:

Todo list:

  • Interface this library with a high-level planner that provides the reference
  • Interface with an open source simualtor (eg: Gazbeo or Webots) for better testing
  • Parmeterize the linearized error dynamics in terms of lateral and longitudinal errors w.r.t the reference trajectory.
  • Compare mpc with other control methods (eg: Pure pursuit, PID)
  • Any further suggestions/feedback is always welcome.

About

Simple library to simulate, test and tune Model Predictive Control (MPC) for autonomous vehicles.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published