- 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
- boost v1.58
- osqp
- osqp-eigen
- Eigen3
- cmake v3.0+
- googletest (only for testing).
- spdlog - For logging/debugging
- json - For reading in params
- matplotlib-cpp - For plotting
git clone https://github.com/vTechSavyy/vehicle-mpc-controller.git
cd vehicle-mpc-controller
mkdir build && cd build
cmake ../
make
./mpc-bicycle-double-lane-change
The params of the simualtion and mpc-controller are set through a json file in the params
folder
- 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.