The codes for :-
- Delay aware robust control for safe autonomous driving
- Delay aware robust control for safe autonomous driving and racing
NOTE : There are some notation errors in our IEEE IV conference paper (1). The original non-linear model is linearized around the current state at every time step into a linear system. However, in the MPC's prediction horizon, we assume time-invariant dynamics. An updated version can be found here : Updated arxiv version
-
Controller A/ and Controller B/ : All the code files for Controller A and B implementation of Delay aware robust control for safe autonomous driving which includes delay aware robust tube MPC formulation for global frame of reference with simulations in ROS Gazebo
-
Controller racing A/ and Controller racing B/ : All the code files for Controller A and B implementation of Delay aware robust control for safe autonomous driving and racing which includes delay aware robust tube MPC formulation for frenet frame of reference with simulations on race-like environments on Carla
-
global_racetrajectory_optimization/ : Adapted from Link. Contains code files for generating global racing line reference for 2nd work.
-
launch/ : Contains launch files to be used for ROS gazebo simulations
-
models/ : Contains additional models used in Gazebo simulation
-
worlds/ : Contains world files for gazebo simulation
- Carla (>=0.9.7)
- ROS (relevant version depending on OS)
- Gazebo (Required only for 1st work)
- Python (>3.8)
- pytope
- pygame
- scipy
- casadi
- Set up carla(>=0.9.7, tested on 0.9.8) under 'Controller racing A' directory
- Install additional map Town07 following the instructions from :-
- Change directory to 'Controller racing A'
cd Controller\ racing\ A
- (optional) Invariant set has already been pre-calculated, but if needed to recalculate for different parameters, change parameters in header file of inv_set_calc.py and run:-
python inv_set_calc.py
- In each new terminal from now on, source ros at the beginning. In a new terminal run :-
roscore
- In a new terminal, launch carla, make sure Town07 map is installed.
- Set SCENE='standalone' for experiment 2, 'one_vehicle' for experiment 3, 'one_vehicle_turn' for experiment 4 in carla_utils.py
- In a new terminal, for experiment 2, set hyperparameters in header of mpc_robust_frenet_without_obstacles.py as required and run :-
python mpc_robust_frenet_without_obstacles.py
For experiment 3 and 4, change hyperparameters in header of mpc_robust_frenet.py and run :-
python mpc_robust_frenet.py
- In a new terminal, launch :-
python pre_compensator.py
The vehicle should be moving at this point. The experimental result files and plots should be saved at the end of the experiment under 'outputs_' folder with suffix 'with_comp' and 'without_comp' respectively based on if delay compensation is enabled or not in header of mpc_robust_frenet_without_obstacles.py or mpc_robust_frenet.py accordingly
- Change directory to 'Controller racing B'
cd Controller\ racing\ B
- In each new terminal from now on, source ros at the beginning. In a new terminal run :-
roscore
- In a new terminal, launch carla, make sure Town07 map is installed.
- Set SCENE='standalone' for experiment 1, 'one_vehicle' for experiment 3, 'one_vehicle_turn' for experiment 4 in carla_utils.py
- In a new terminal, for experiment 2, set hyperparameters in header of mpc_robust_frenet_without_obstacles.py as required and run :-
python mpc_robust_frenet_without_obstacles.py
For experiment 3 and 4, change hyperparameters in header of mpc_robust_frenet.py and run :-
python mpc_robust_frenet.py
- In a new terminal, launch :-
python pre_compensator.py