/TOTPT

Time-Optimal Trajectory Planning and Tracking (TOTPT) for autonomous vehicles.

Primary LanguageMATLAB

Time-Optimal Trajectory Planning and Tracking for Autonomous Vehicles

TOTPT solves time-optimal raceline using NLP with direct collocation approach, and performs NMPC path tracking within the racing scenario implemented in Simulink.

Installation

Prerequisites

Download TOTPT and unzip at local directory

Dependencies

  • Run totpt_env_variables.m to add subfolders to Matlab search path
  • Open acados_env_variables_windows.m in nmpc folder, fill acados and casadi installation paths in the two lines
acados_dir = 'A:\path\to\acados';
casadi_dir = 'B:\path\to\casadi-3.6.5';

Workflow

  1. navigate to tro folder, run live script tro_main to generate smoothed time-optimal raceline (1~3 min, depend on problem size)
  2. navigate to nmpc folder, run nmpc_gen to generate NMPC mex function and automatically copy it to sim folder
  3. navigate to sim folder, run live script racing_sim to simulate racing scenario

tracking

Folders

  • racetrack-database: racelines and track widths of race tracks, forked from (https://github.com/TUMFTM/racetrack-database)
  • functions: helper functions for track processing
  • params: track smoothing parameters and vehicle parameters
  • tro: offline time-optimal trajectory optimization framework
  • nmpc: online NMPC trajectory tracking framework