Carla was creeping, not full stop, when the traffic light was red.
When the traffic light turned green, Carla had a smooth acceleration.
The DBW node outputs /vehicle/brake_cmd
, but Carla does not stop at the stop position.
Maybe the brake torque is not enough.
current_velocity , throttle_cmd and brake_cmd |
/base_waypoints and /current_pose |
---|---|
The car did not stop even though the traffic light was red.
The DBW node outputs /vehicle/brake_cmd
, but Carla does not stop at the stop position.
The cause is that it accelerates too much at first, and the transition to deceleration is slow.
current_velocity , throttle_cmd and brake_cmd |
/base_waypoints and /current_pose |
---|---|
We limit the velocity toward the stop line to approximately 10 km/h and improve the detection performance for blurred images.
MAX_DECEL
from 5.0 to 0.5 in waypoint_updater.py
.real_model.h5
used by tl_detector.py
(but not included in repository).MAX_DECEL and decelerate_vel |
real_model.h5 (1.1.0) |
---|---|
The car did not stop even though the traffic light was red.
The cause is that the blurred traffic lights are can not be detected when the velocity exceeds about 10 km/h on the way to /traffic_waypoint
.
/current_velocity and /traffic_waypoint |
real_model.h5 (1.0.0) |
---|---|
Night | Day |
---|---|
twist.twist.linear.x
in waypoint_loader.py
./vehicle/dbw_enabled
.The following is a system architecture diagram showing the ROS nodes and topics used in the project. The ROS nodes and topics shown in the diagram are described briefly in the Code Structure section below.
Below is a brief overview of the repo structure, along with descriptions of the ROS nodes.
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.
We 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
.
See code in /ros/src/tl_detector/.
This package contains the waypoint updater node: waypoint_updater.py
.
See code in /ros/src/waypoint_updater/.
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
.
See code in /ros/src/twist_controller/.
A package that contains a server for communicating with the simulator, and a bridge to translate and publish simulator messages to ROS topics.
A package which includes definitions of the custom ROS message types used in the project.
A package which loads the static waypoint data and publishes to /base_waypoints
.
A package containing code from Autoware which subscribes to /final_waypoints
and publishes target vehicle linear and angular velocities in the form of twist commands to the /twist_cmd
topic.
We use Tiny YOLOv3 for traffic light detection and classification.
Loss | Val Loss |
---|---|
Graph of the Tiny YOLOv3 model:
We use YOLOv3 for traffic light detection and classification.
YOLOv3 (open youtube video on click):
Tiny YOLOv3 (open youtube video on click):
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.
Please use one of the two installation options, either native or docker installation.
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.
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
git clone https://github.com/udacity/CarND-Capstone.git
cd CarND-Capstone
pip install -r requirements.txt
cd ros
catkin_make
source devel/setup.sh
roslaunch launch/styx.launch
unzip traffic_light_bag_file.zip
rosbag play -l traffic_light_bag_file/traffic_light_training.bag
cd CarND-Capstone/ros
roslaunch launch/site.launch