This repository is my research work in the field of self-driving cars for the Department of Automatic Control Systems (IU-1) at Bauman Moscow State Technical University (BMSTU).
To implement the software module for the synthesis of the trajectory of an autonomous unmanned vehicle, the CARLA autonomous driving simulator was selected - official website.
To visualize the result, a HUD interface was written using the library pygame, and also the full path of the car is drawn using the visualization of waypoints for a bird view.
HUD view | Bird view |
---|---|
https://youtu.be/hBpiEhYjVfU | https://youtu.be/n9TGjnB6cDQ |
To find the shortest path between two given points, the topological graph of the simulator's city map and the A* search from the library were used NetworkX.
../PythonAPI
│
├── carla/
├── agents/
├── navigation/
├── basic_agent.py
├── behavior_agent.py
├── behaviot_types.py
├── constant_velocity_agent.py
├── controller.py
├── global_route_planner.py
├── local_planner.py
├── tools/
├── misc.py
├── dist/
├── scene_layout.py
├── example/
├── automatic_control.py
├── util/
- Install CARLA_0.9.14 - Windows
- Clone this repository and replace the Python API directory of the CARLA simulator with the contents of this repository
- Create virtual environment
- launch anaconda promt
- conda create --name carla-sim python=3.7
- activate carla-sim
- Install dependencies
pip install carla
pip install pygame
pip install numpy
pip install jupyter
pip install opencv-python
cd PythonAPI\examples
python automatic_control.py
To change the route of the car, it is necessary in the file automatic_control.py change this line of code to the required places of appearance and places of completion of the path
destination = random.choice(spawn_points).location
For all questions related to the project, please write to AlexeyShevchenko03@yandex.ru.