This is the project repo for the final project of the Udacity Self-Driving Car Nanodegree: Programming a Real Self-Driving Car. For more information about the project, see the project introduction here. We are submitting this project as a team effort. Here is the team composition.
Num | Name | Role | |
---|---|---|---|
1 | Jan Rosicky | janrosicky@centrum.cz | Member |
2 | Komuraiah Poodari | poodari@yahoo.com | Member |
3 | Rakesh Chittineni | rakeshch.net@gmail.com | Member |
4 | Santosh Bhushan | 2sbsbsb@gmail.com | Leader |
This project is based on the architecture framework provided by Udacity as per the following system architecture diagram.
source: Udacity Project Lesson section 4.
We implemented traffic light detection by processing the camera image on need basis. For example processig image with minimum time gap (few milliseconds) and only when the traffic light ahead is few hundred waypoints ahead of current car position. The objective is to optimize the processing on the platform.
We used closest distance measure between car waypoint and traffic light waypoint to identify the closest light ahead of the car. We used a pre-trained convolutional neural network model for inferencing the traffic light classification. We used two models, one each for site inferencing and simulator inferencing.
Planning system has two nodes, viz., waypoint loader
and waypoint updater
nodes.
The node waypoint loader
loads the complete set of traffic waypoints for the entire track.
The node waypoint updates
updates next set of waypoints ahead of the car. We used only 50 look ahead waypoints to optimize processing.
We implemented to have the car stopped 2 waypoints ahead of the traffic light waypoint ahead, the signal warrants a stop.
This module contains the following nodes.
The node, DBW (Drive By Wire)
computes control inputs for actuators, throttle
, brake
and steering angle
based on the desired velocities.
We implemented the main control logic in twist_controller.py
using low pass filter, yaw_controller and PID cotroller given in the project. We had to play with various parameters.
We had to spend good amount of bandwidth on making environment setup stable, as there are quite a few options and the project needs high-end platform with GPU. We look forward to running our implementation on real car, Carla and get feedback.
The rest of the sections are unmodified sections came with the project baseline.
Please use one of the two installation options, either native or docker installation. As a team some of us used native installation, some of us used docker based installation.
-
Be sure that your workstation is running Ubuntu 16.04 Xenial Xerus or Ubuntu 14.04 Trusty Tahir. Ubuntu downloads can be found here.
-
If using a Virtual Machine to install Ubuntu, use the following configuration as minimum:
- 2 CPU
- 2 GB system memory
- 25 GB of free hard drive space
The Udacity provided virtual machine has ROS and Dataspeed DBW already installed, so you can skip the next two steps if you are using this.
-
Follow these instructions to install ROS
- ROS Kinetic if you have Ubuntu 16.04.
- ROS Indigo if you have Ubuntu 14.04.
-
- Use this option to install the SDK on a workstation that already has ROS installed: One Line SDK Install (binary)
-
Download the Udacity Simulator.
Build the docker container
docker build . -t capstone
Run the docker file
docker run -p 4567:4567 -v $PWD:/capstone -v /tmp/log:/root/.ros/ --rm -it capstone
To set up port forwarding, please refer to the instructions from term 2
- Clone the project repository
git clone https://github.com/udacity/CarND-Capstone.git
- Install python dependencies
cd CarND-Capstone
pip install -r requirements.txt
- Make and run styx
cd ros
catkin_make
source devel/setup.sh
roslaunch launch/styx.launch
- Run the simulator
- Download training bag that was recorded on the Udacity self-driving car.
- Unzip the file
unzip traffic_light_bag_file.zip
- Play the bag file
rosbag play -l traffic_light_bag_file/traffic_light_training.bag
- Launch your project in site mode
cd CarND-Capstone/ros
roslaunch launch/site.launch
- Confirm that traffic light detection works on real life images