GithubHelp home page GithubHelp logo

hirovi / udacity-highway-path-planning Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 2.51 MB

Path Planning Project

CMake 1.84% C++ 83.15% C 2.03% Shell 0.17% Cuda 1.14% Fortran 11.48% Python 0.08% JavaScript 0.07% CSS 0.05%

udacity-highway-path-planning's Introduction

Path-Planning-Udacity

This is my solution to the Path Planning Project of the Udacity Self Driving Nanodegree.

The goal is to design a path planner that is able to create smooth, safe paths for the car to follow along a 3 lane highway with traffic. This implementation succesfully keeps the vehicle inside its lane, avoids hitting other cars and changes lane if required using localization, sensor fusion and map data.

About

At the end of the day the objective of a path planner is to bring you from point A to point B successfuly. Therefore, the planner needs to define which xy points are the most suitable at each timestamp. We obviously don't want a path that goes in a straight line jumping from one point to the other making the trip the most unpleasent ever. Instead, it is much prefered a smooth transition that brings you to your goal as comfortable as possible, for this reason, a spline was used.

Every 20ms the simulator reaches the program asking "to what point should I go next?", a total of 50 points are constantly updated according to the spline. THis spline has been predefined with some points from the previous path and some other future points spaced evenly 30m away, creating a total of 5 points to generate the spline. The vehicle choses either to continue in the same lane or to change according to the feasibility of reaching its target speed of 50mph. When the vehicle detects that the front car is too close either slows down or checks whether changing lane is possible. The legality of changing road is determined according to the postion of the other vehicles in their respective lanes, when legal to change lane, the car create a new spline that allows to smootlhy change of lane(this is accomplished by spacing-out more the points).

Improvements

Would be cool to create a neural net where you feed the sensor fusion data and it outputs the position at each timestamp. Maybe a RNN would be more ideal...

Result

The car is able to drive at least 4.32 miles without any incident. Driving according to the speed limit without braking the max acceleration and jerk limits.The car doesn't collide and it's able to succesfully change lanes when required.

Build & Run Instructions

  1. Clone repo
  2. Make a build directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./path_planning

udacity-highway-path-planning's People

Contributors

hirovi avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

drivenimo36

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.