This project aims to automate left and right turns and overtaking for autonomous vehicles with the self-driving cars simulator CARLA. The two main focus are on Turning and Overtaking by Bezier curve (Bezier Curve).
Windows 10 CARLA 0.9.11
Go to official Carla Releases Github page.
Download [Windows] CARLA 0.9.11, unzip the file and rename the folder as CARLA_0.9.11. Additional maps are optional.
Put CARLA_Simulator folder and this repository folder in the same folder.
numpy
, opencv
and pygame
should be correctly installed.
-
Go to CARLA_0.9.11 folder,
cd Carla/CARLA_0.9.11
run CARLA in Low Graphic Quality
./CarlaUE4.sh -quality-level=Low
-
Go to the environment folder of this repository. There are options for generating different scenes.
To perform turning in empty city:
python ego_vehicle.py
To perform turning in city with n=80 vehicles: run
ego_vehicle.py
first `python ego_vehicleOpen new terminal. go to exaples directory of PythonAPI of carla repository
cd C:\CARLA_0.9.11\WindowsNoEditor\PythonAPI\examples
Spawn n=80 vehicle of how many you want
python spawn_npc.py -n 80
To perform overtaking when there is one vehicle in front, generate scene 1 where only the ego vehicle exists by:
python ego_vehicle.py -s 1
Note: Overtaking is still experimental and might fail in heavy traffic environment. Do not spawn vehicles for overtaking