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.
Team Members | eMail Address |
---|---|
Andrew Friedman (Team Lead) | andrew at cyberdreaming dot net |
Christian Röpke | chroepke at gmail dot com |
Angelo Antonio Manzatto | angelo.manzatto at yahoo dot com dot br |
Lily Huang | lilyhappily at 126 dot com |
Sarath Radhakrishnan | sarath.rk at outlook dot com |
For this project, you'll be writing ROS nodes to implement core functionality of the autonomous vehicle system, including traffic light detection, control, and waypoint following! You will test your code using a simulator, and when you are ready, your group can submit the project to be run on Carla.
The following is a system architecture diagram showing the ROS nodes and topics used in the project. You can refer to the diagram throughout the project as needed. The ROS nodes and topics shown in the diagram are described briefly in the Code Structure section below, and more detail is provided for each node in later classroom concepts of this lesson.
If you want to get a good result, using ROS bags
that were recorded at the test site: Traffic Light Detection Test Video. The images are used to train traffic lights classifier based on the TensorFlow Object Detection API. You will find the details on my github repository
The project will require the use of Ubuntu Linux (the operating system of Carla) and a new simulator. To reduce installation difficulties, we have provided an in-browser Workspace for you to work with. You can find instructions for the Workspace and the Workspace itself later in this lesson.
If you prefer not to use the Workspace, follow the steps below to get set up:
-
Because ROS is used, you will need to use Ubuntu to develop and test your project code. You may use
- Ubuntu 14.04 with ROS Indigo
- Ubuntu 16.04 with ROS Kinetic
You are welcome to use your own Ubuntu installation or virtual machine (unsupported), or you can use the VM provided in Your Virtual Machine in the "Introduction to ROS" lesson. The provided VM has ROS and Dataspeed DBW installed already.
-
Windows 10 users - your fellow students have suggested that the best local option is to use the VM for ROS, while running the simulator natively (and making sure to open ports between the two for communication).
-
The project repo can be found here. Clone or download the project code before the next sections so you can follow along with the code descriptions! In the README, you should be able find any additional dependencies needed for the project.
-
The system integration project uses its own simulator which will interface with your ROS code and has traffic light detection. You can download the simulator here. To improve performance while using a VM, we recommend downloading the simulator for your host operating system and using this outside of the VM. You will be able to run project code within the VM while running the simulator natively in the host using port forwarding on port
4567
. For more information on how to set up port forwarding, see the end of the classroom concept here.
The VM is a rather large download (4+GB!). So, find yourself a good internet connection and download the compressed VM disk image.Once you are up and running, you might be asked to input a password to enter the VM. The password for the VM is udacity-nd
We recommend using VirtualBox to run the VM. This will enable you to easily use port forwarding, so you can run the final project simulator in your native operating system (the host) while using the VM for running ROS code.
Whichever operating system you're on, download and install the appropriate platform package for your operating system (the host) and then follow the instructions below:
- Download and install VirtualBox.
- Download the image from supplied link.
- Unzip the image.
- Open VirtualBox Application.
- Click File > Import Appliance..
- Click the folder icon on the right and navigate to your unzipped image (the .ovf file).
- Follow the prompts to import the image.
- From the VirtualBox Manager, select your VM and press start.
-
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
Outside of requirements.txt
, here is information on other driver/library versions used in the simulator and Carla:
Specific to these libraries, the simulator grader and Carla use the following:
Simulator | Carla | |
---|---|---|
Nvidia driver | 384.130 | 384.130 |
CUDA | 8.0.61 | 8.0.61 |
cuDNN | 6.0.21 | 6.0.21 |
TensorRT | N/A | N/A |
OpenCV | 3.2.0-dev | 2.4.8 |
OpenMP | N/A | N/A |
We are working on a fix to line up the OpenCV versions between the two.