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 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
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 |
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
- Track-1 - https://youtu.be/0cm4fpY_BcU.
- Track-2 - https://youtu.be/56EvVMi6otk