This is the project repo for the final project of the Udacity Self-Driving Car Nanodegree: Programming a Real Self-Driving Car.
The project is successfully delivered by the team of "Cruising-by-the-Bay" of Udacity Self-Driving-Car students.
Here are the team members:
Name | Role | |
---|---|---|
Yu Shen | yubrshen@gmail.com | team lead |
Peng Zhang | zpactfc@gmail.com | |
Sumanth Reddy Kaliki | sumanth818@gmail.com | |
Sahil Juneja | sahiljuneja17@gmail.com | |
Hector Sanchez Pajares | hector.spc@gmail.com |
When simulator is started and "Manual" unchecked before the ROS nodes are started and let to finish initialization. The message of "dbw_enabled" might be lost. Then the car would not receive /vehicle/throttle_cmd, etc. The car would not move along the track properly.
To overcome the potential problem, please start ROS nodes and let them finish initialization, then start the simulator, and then uncheck "Manual". Likewise, to drive the real car, the ROS nodes should also be started and let to initialize first then engage dbw to drive.
This ends the limitation.
The project bases on the architecture proposed by Udacity. It uses ROS as the implementation framework. The project implements the following ROS nodes:
- waypoint_updater
- tl_detector
- dbw_node
It also implements a deep learning classifier to classify traffic light's colors. By learning from examples, the classifier can classify traffic light samples in both the simulated environment, and real traffic light images. Experiements shows that the classification can provide sufficient level of correctness for traffic light color classification.
Extensive experiments have shown that the system can drive a car autonomously correctly on the simulated track following the traffic light signals. Based the requirements, the car should stop at the end of the track. The system is designed, built to drive real car. Tests will be conducted to drive real car in a parking lot of Udacity.
Besides adhering to the established architecture, special care is made to pre-compute and store required distance computation, so that the real-time computation is minimized, which may improve the responsiveness, and reliability of the Self-Driving-Car system.
For more information about the project, see the project introduction here.
To review the design artifacts (design document and source code), goto Design in Literate Programming
Please use one of the two installation options, either native or docker 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 (a bag demonstraing the correct predictions in autonomous mode can be found here)
- Unzip the file
unzip traffic_light_bag_files.zip
- Play the bag file
rosbag play -l traffic_light_bag_files/loop_with_traffic_light.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