Giter Club home page Giter Club logo

system_integration's Introduction

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

Team Members Email Address Location
Onur Ucler (Team lead) [email protected] Folsom, CA
Srikant Rao [email protected] Folsom, CA

Simulator Result

IMAGE ALT TEXT HERE

Installation Instructions

  • 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

  • Dataspeed DBW

  • Download the Udacity Simulator.

Setup

  1. Clone the project repository
git clone https://github.com/srikantrao/System_Integration.git
  1. Install python dependencies
cd CarND-Capstone
pip install -r requirements.txt
  1. Make and run
cd ros
./clean.sh
source devel/setup.sh
  1. Running different launch files for different scenarios

If you want to run the simulator, run the following command

roslaunch launch/sim.launch

If you want to run it on the car, run the following command

roslaunch launch/site.launch

If you want to see a visualization of the detector working

roslaunch launch/site_visualization.launch
  1. Run the simulator

Real world testing

  1. Download training bag that was recorded on the Udacity self-driving car (a bag demonstraing the correct predictions in autonomous mode can be found here)
  2. Unzip the file
unzip traffic_light_bag_files.zip
  1. Play the bag file
rosbag play -l traffic_light_bag_files/loop_with_traffic_light.bag
  1. Launch your project in site mode
cd CarND-Capstone/ros
roslaunch launch/site.launch
  1. Confirm that traffic light detection works on real life images

You can confirm that the detector works on real life images by running the rosbag

cd CarND-Capstone/ros
roslaunch launch/site_visualization.launch

Open another terminal and go to CarND-Capstone/ros

source devel/setup.bash
rosbag play -l traffic_light_bag_files/loop_with_traffic_light.bag

Open another terminal and go to CarND-Capstone/ros

source devel/setupbash
rosrun tools rosbagVisual.py

Object Detection

We have explored multiple options to detect traffic lights: firs t one was building our own Deep Convolutional Neural Network (CNN) and using pre-trained models.

What we noticed that we need a more data to train our CNN models to have a good model. Due to the limmitted training data and training time constraints we ended up using pre-trained object detection model (Fast Region-based Convolutional Network ). Here is the model link: https://github.com/tensorflow/models/tree/master/research/object_detection

A jupyter notbook was created to test the model accuracy and here are the some outputs. Please refer to the notebook, ~/classifier/faster-R-CNN/object_detection.ipynb, for more details.

Green

Yellow

Red

Implementation Details

Twist Controller Node

The twist controller node was implemented using a PID controller for brake/throttle.

At a high level, the throttle value was given by

throttle = Kp * vel_err + Kd * vel_err_delta + Ki * vel_err_integral

If the throttle was negative, it was considered a brake value. The steering angle was determined based on code provided in yaw_controller.py

For the same radius

v_obs * r = w_obs and v_ctrl * r = w_ctrl

therefore,

w_ctrl = w_obs * v_ctrl / v_obs

which can then be extended to calculate steering_angle.

A low pass filter usign exponentially weighted averages was used to smoothen the steering output result. The steering angle output is effectively a moving window average of the last 20 values for simulation and last 5 values for the site.

system_integration's People

Contributors

aoinakanishi avatar awbrown90 avatar baumanab avatar bydavy avatar carlosgalvezp avatar ckirksey3 avatar ianboyanzhang avatar j-rojas avatar luisandroide avatar ncondo avatar olala7846 avatar oucler avatar spicavigo avatar srikantrao avatar swwelch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.