This is the project repo for the final project of the Udacity Self-Driving Car Nanodegree: Programming a Real Self-Driving Car.
The following video contains testing of the project using simulator
This project require to implement ROS nodes (partially) to drive self driving car. It includes implementation of waypoint updater, twist controller, traffic light detector and classifier. The project consists of the following architecture:
Waypoint updater gets information about vehicle pose and performs feeding waypoint follower with 200 points ahead using reference points from waypoint loader. It implements finite state machine for handling start/stop logic according to a nearest traffic light state. It also contains code for updating waypoints linear velocity and calculating optimal deceleration and acceleration speeds.
Traffic light detector and classifier is implemented as a deep neural network for object detection. It performs object detection and classification at the same time. For simulated traffic lights neural net was implemented using Tensorflow Object Detection API. Here is a pretty good tutorial of how to do that. Original network used for training is faster_rcnn_inception_v2_coco. For real traffic light detection and classification YOLO implementation was used. Training images were extracted from simulator and ROSBAGs and manually annotated using labelImg software. Images and annotations can be found here and herehere Weights cannot be uploaded to github due to file size and can be found here
This node gets twist data as input and generates brake/throttle/steering messages using PID controllers.
Performs target velocities calculation based on pure-persuit algorithm to follow the trajectory.
Performs loading reference trajectory points and generates linear and angular velocities for each point based on desired velocity.
-
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.
- 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
Name | |
---|---|
Dmitry Tyugin | [email protected] |