Skip to content

Autonomous driving car in a Unity-based simulator using behavioral cloning.

License

Notifications You must be signed in to change notification settings

vstark21/SDC_in_simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDC_in_simulator

Driving a car autonomously in a simulated world using behavioral cloning. This can be done using traditional approach as well as deep learning approach.

You can see a glimpse here

Simulator

Simulator used in this is created by Udacity. This simulator contains two modes

  • Training mode
  • Autonomous mode

You can download it from this repo. And training mode looks like

Track-1 Track-2

To drive car autonomously open simulator and click on autonomous mode and then run in this folder

python drive.py model.h5

Approach

For both of the tracks, I trained a CNN (Modified Lenet architecture) with data provided by Udacity and collected some using simulator.

Data contains

  • Steering angle at that specific time
  • Three pictures from cameras at left, right, center of the car
  • Speed at that specific time
  • Throttle at that specific time

For Track-1 training, I used images from center of the car and respective steering angles. It looks like this

But for Track-2 training, I used images from center, left, right and flipped image of center image to train the network and used steering angle data in this way

Center Image Left Image Right Image Flipped Center Image
steer_angle (data obtained from simulator) steer_angle + 0.5 steer_angle - 0.5 steer_angle * -1

Results

Model is driving good but in some cases like sharp turnings, model is not driving smoothly (but more data and a bigger network can solve this problem).

You can see them here

About

Autonomous driving car in a Unity-based simulator using behavioral cloning.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages