This is the project repo for Programming a Real Self-Driving Car, using TensorFlow, ROS and OpenCV as part of the final project of the Udacity Self-Driving Car Nanodegree. For more information about the project, see the Udacity project repository here.
This project is the combined work of;
- Andre Meeusen - [email protected]
- Christian Marzahl - [email protected]
- Haidyn Mcleod - [email protected]
- Kamil Kindziuk - [email protected]
- Punnu Phairatt - [email protected]
A video of the project in action using the simulator can be viewed here.
An ipython Notebook of the traffic light detection pipeline can be found in /ros/src/tl_detector/training/TrafficLightPipeline.ipynb
here.
The code requires a workstation 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 a minimum:
- 2 CPU
- 2 GB system memory
- 25 GB of free hard drive space
Follow these instructions to install ROS
- ROS Kinetic if you have Ubuntu 16.04.
- ROS Indigo if you have Ubuntu 14.04.
The Simulator uses the Dataspeed DBW model which can be found here here
- Use this option to install the SDK on a workstation that already has ROS installed: One Line SDK Install (binary)
Download the Udacity Simulator for your host operating system from here.
If using a Virtual Machine, it is recommended to downloading the simulator for your host operating system and using this outside of the VM. You will be able to run code within the VM while running the simulator natively on the host using port forwarding on port 4567
for both the Host and Guest ports. For more information on how to set up port forwarding, see here.
Not required, but if you would prefer to use Docker to run the system, Install Docker from here
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
- Clone the project repository
git clone https://github.com/Heych88/Udacity-CarND-Capstone.git
- Install python dependencies
cd Udacity-CarND-Capstone
pip install -r requirements.txt
- Make and build the code
cd ros
catkin_make
source devel/setup.sh
- Run styx
roslaunch launch/styx.launch
- Run the simulator and untick the manual box in the top left of the screen. The car will now drive around the track, stopping at red lights, and you should arrive at a result similar to the below.
- Download training bag that was recorded on the Udacity self-driving car (a bag demonstrating 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