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.
Name | Udacity account email |
---|---|
Mario Landry (Team Lead) | mario.landry AT gmail.com |
Rob Fitch | rob.m.fitch AT gmail.com |
Rafael Rivas | rafael.rivas.dev AT gmail.com |
Patrick Poon | patrickmpoon AT gmail.com |
The waypoint updater is responsible for calculating the next LOOKAHEAD_WPS (200) Waypoints and setting a target velocity for each. The default target velocity at each waypoint is set at system startup and recorded into the base waypoints. This velocity is used as a ceiling for the vehicle velocity and intentionally left unaltered by the waypoint updater. At each call to the waypoint updater, a subset of the base waypoint list is created of length LOOKAHEAD_WPS, starting with the calculated NEXT_WAYPOINT. The velocities of these waypoints are then set to allow smooth and safe deceleration for any obstacles the car encounters. To aid in this, the current vehicle velocity and maximum acceleration value are used to determine the distance required by the vehicle to safely stop. This value is recorded as the deceleration zone or decel_zone.
The waypoint updater subscribes to a list of obstacles as well as a waypoint for the next light. If either of these are populated, they indicate zones the car should not pass through. The traffic light waypoint, if present, is appended to the end of the list of obstacles. Each waypoint in the obstacle list is accompanied by a standoff distance, indicating how far before reaching the obstacle the car should attempt to stop. The standoff value is determined based on the subscription providing the obstacle.
For every waypoint in the obstacle list found to be within the respective deceleration zone plus standoff distance, a stopping gradient is calculated. The velocity at each final waypoint is the lowest value among these stopping gradients and the velocity already set for the waypoint.
If using a Virtual Machine to install Ubuntu, use the following configuration as minimum:
The Udacity team provided a virtual machine that 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
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/udacity/CarND-Capstone.git
Install python dependencies
cd CarND-Capstone
pip install -r requirements.txt
cd ros
catkin_make
source devel/setup.sh
roslaunch launch/styx.launch
unzip traffic_light_bag_files.zip
rosbag play -l traffic_light_bag_files/loop_with_traffic_light.bag
cd CarND-Capstone/ros
roslaunch launch/site.launch