/Motion-Planning-on-CARLA

Implement Motion Planning for autonomous car on CARLA simulator

Primary LanguagePython

Motion-Planning-on-CARLA

Introduction

This is an assignment from Motion Planning for Self-Driving Cars course of Self-Driving Cars Specialization on Coursera.org.

This assignment implements Motion Planning by implementing behaviour planner, collision checker, local planner and velocity planner using Python as the programming language.

The waypoints for the track are pre-defined.

To realize this function, the open sourse simulator CARLA is introduced.

Prerequisites

First CARLA must be installed on your machine, the CARLA loader requires Ubuntu 16.04 or later to run

Please go through CARLA-Setup-Guide-Ubuntu.pdf and install CARLA and all other dependencies properly.

CARLA Simulator can be downloaded here

How to run it

First clone this repository and put it under PythonClient directory.

1. Load the simulator

Open a terminal and do cd ~/opt/CarlaSimulator.

Then do ./CarlaUE4.sh /Game/Maps/Course4 -windowed -carla-server -benchmark -quality-level=Low -fps=30

2. Run the LKA controller

Open another terminal and do cd ~/opt/CarlaSimulator/PythonClient/Course4FinalProject.

(optional) do sudo apt-get install python3-tk in case you do not have Tkinter module.

Run python3 module_7.py to execute the controller

The car will start to track the lead car and avoid obstacles, stopping in front of the stop sign.

Simulation results

The images shown below is the result of vehicle trajectory.

The green line is the track(ground truth) and the orange line is the trajectory.