TOTPT solves time-optimal raceline using NLP with direct collocation approach, and performs NMPC path tracking within the racing scenario implemented in Simulink.
- Matlab and Simulink (tested on R2017a and R2022a on Win11)
- Install CasADi
- Install acados for Matlab
Download TOTPT and unzip at local directory
- Run
totpt_env_variables.mto add subfolders to Matlab search path - Open
acados_env_variables_windows.minnmpcfolder, 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';
- navigate to
trofolder, run live scripttro_mainto generate smoothed time-optimal raceline (1~3 min, depend on problem size) - navigate to
nmpcfolder, runnmpc_gento generate NMPC mex function and automatically copy it tosimfolder - navigate to
simfolder, run live scriptracing_simto simulate racing scenario
racetrack-database: racelines and track widths of race tracks, forked from (https://github.com/TUMFTM/racetrack-database)functions: helper functions for track processingparams: track smoothing parameters and vehicle parameterstro: offline time-optimal trajectory optimization frameworknmpc: online NMPC trajectory tracking framework
@article{li2024time,
title={Time-Optimal Trajectory Planning and Tracking for Autonomous Vehicles},
author={Li, Jun-Ting and Chen, Chih-Keng and Ren, Hongbin},
journal={Sensors},
volume={24},
number={11},
pages={3281},
year={2024},
publisher={MDPI}
}
