This is the project repo for the final project of the Udacity Self-Driving Car Nanodegree: Programming a Real Self-Driving Car.
Name | Slack | |
---|---|---|
Roberto Arce | [email protected] | @rarce (Team Lead) |
Nithin Alex John | [email protected] | @nithinalex |
Farhan Ahmad | [email protected] | @farhanhubble |
Saurabh Sood | [email protected] | @saurabhsood |
This package contains the waypoint updater node: waypoint_updater.py
. The purpose of this node is to update the target velocity property of each waypoint based on traffic light and obstacle detection data. This node will subscribe to the /base_waypoints
, /current_pose
, /obstacle_waypoint
, and /traffic_waypoint
topics, and publish a list of waypoints ahead of the car with target velocities to the /final_waypoints
topic.
Carla is equipped with a drive-by-wire (dbw) system, meaning the throttle, brake, and steering have electronic control. This package contains the files that are responsible for control of the vehicle: the node dbw_node.py
and the file twist_controller.py
, along with a pid and lowpass filter that you can use in your implementation. The dbw_node subscribes to the /current_velocity
topic along with the /twist_cmd
topic to receive target linear and angular velocities. Additionally, this node will subscribe to /vehicle/dbw_enabled
, which indicates if the car is under dbw or driver control. This node will publish throttle, brake, and steering commands to the /vehicle/throttle_cmd
, /vehicle/brake_cmd
, and /vehicle/steering_cmd
topics.
This package contains the traffic light detection node: tl_detector.py
. This node takes in data from the /image_color
, /current_pose
, and /base_waypoints
topics and publishes the locations to stop for red traffic lights to the /traffic_waypoint
topic.
The /current_pose
topic provides the vehicle's current position, and /base_waypoints
provides a complete list of waypoints the car will be following.
You will build both a traffic light detection node and a traffic light classification node. Traffic light detection should take place within tl_detector.py
, whereas traffic light classification should take place within ../tl_detector/light_classification_model/tl_classfier.py
.
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 using docker-compose
docker-compose build
Access to the docker using docker-compose
docker-compose exec ros bash
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