Author: Erik Börve, [email protected]
This project provides an implementation of an autonomous truck in a multi-lane highway scenario. The controller utilizes non linear optimal control to compute multiple trajectories, of which the most cost-efficent is choosen.
Clone the project in your local machine:
git clone <repository cloning url>
The environment is created for python 3.9.10. Using conda this can be set as:
conda create --name Autonomous-Truck-Sim python=3.9.10 -y
source activate Autonomous-Truck-Sim
Finally, install dependencies:
pip install -r requirements.txt
Simulations are run via the "main" file. This is also where simulations are configured, including e.g., designing traffic scenarios and setting up the optimal controllers.
The projects contains the following files.
.
├── controllers.py
├── Data_example
└── ex1.csv
└── metaData_ex1.txt
├── gitignore
├── helpers.py
├── main.py
├── README.md
├── requirements.txt
├── scenarios.py
├── simRes.gif
├── templateRLagent.py
├── traffic.py
└── vehicleModelGarage.py
makeController: Generates optimal controller based on specified scenario.
decisionMaster: Optimizes the trajectory choice, returns optimal policy.
Contains assisting functions, e.g., for data extraction and plotting.
Running and setting up simulations.
Formulates constraints for the different scenarios considered in the optimal controllers.
Template class for communicating with the lower level controllers.
Combined traffic: Used to communicate with all vehicles in traffic scenario.
vehicleSUMO: Creates a vehicle with specified starting position, velocity and class.
Contains truck models that can be utilized in the simulation.