• Stars
    star
    116
  • Rank 302,979 (Top 6 %)
  • Language
    Python
  • Created over 5 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Implementing Lane Keeping Assist (LKA) on CARLA simulator

Lane-Keeping-Assist-on-CARLA

Introduction

This is an assignment from Introduction to Self-Driving Cars course of Self-Driving Cars Specialization on Coursera.org.

This assignment implements Lane Keeping Assist function by applying pure pursuit and Stanley methods for lateral control and PID controller for longitudinal control using Python as the programming language.

The waypoints and corresponding velocities 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/RaceTrack -windowed -carla-server -benchmark -quality-level=Low -fps=30

2. Run the LKA controller

Open another terminal and do cd ~/opt/CarlaSimulator/PythonClient/Lane-Keeping-Assist-on-CARLA.

(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(default is MPC control method)

To select 3 different control methods:

MPC - python3 module_7.py --control-method MPC

Stanley - python3 module_7.py --control-method Stanley

Pure Pursuit - python3 module_7.py --control-method PurePursuit

The vehicle should starting driving and following the track.

Simulation results

The images shown below is the result of vehicle trajectory(MPC, Stanley and Pure Pursuit method).

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

MPC Method

Stanley Method

Pure Pursuit Method

More Repositories

1

Motion-Planning-on-CARLA

Implement Motion Planning for autonomous car on CARLA simulator
Python
144
star
2

Lidar-and-Radar-sensor-fusion-with-Extended-Kalman-Filter

Fusing Lidar and Radar data with Extended Kalman Filter (EKF)
MATLAB
137
star
3

Motion-planning-based-on-Model-Predictive-control-and-Bezier-spline

A quasi Hybrid A* method is introduced for motion planning of autonomous driving car, based on MPC and Bezier spline
Jupyter Notebook
64
star
4

Multi-Vehicle-Intersection-planning-with-MPC-approach-for-autonomous-vehicles

Implement an MPC approach to coordinate multiple automated vehicles with fixed priorities at an unsignalized intersection
C++
24
star
5

Sensor-Fusion-Using-ES-EKF

Implement Error-State Extended Kalman Filter on fusing data from IMU, Lidar and GNSS.
Python
23
star
6

Kalman-Filter-Based-GPS-Signal-Tracking

Noisy GPS signal filtering algorithm with Kalman Filter
C++
18
star
7

Intersection-planning-with-MPC-approach-for-autonomous-vehicles

Implement an MPC approach to coordinate automated vehicles with fixed priorities
Python
17
star
8

SFND_Radar_Target_Generation_and_Detection

With Radar data, use Fast Fourier Transform(FFT) and 2D CA-CFAR to derive range and velocity of the objects
MATLAB
6
star
9

Machine-Learning

Assignments for Machine Learning course on Coursera from Stanford University
MATLAB
1
star
10

Environment-Perception-For-Self-Driving-Cars

Extract useful scene information from semantic segmentation from neural networks to allow self-driving cars to safely and reliably traverse their environment
Jupyter Notebook
1
star