Coder Social home page Coder Social logo

xjtuyanshi / carnd-path-planning-project Goto Github PK

View Code? Open in Web Editor NEW

This project forked from udacity/carnd-path-planning-project

0.0 0.0 0.0 6.41 MB

Create a path planner that is able to navigate a car safely around a virtual highway

License: MIT License

CMake 5.91% Shell 0.19% C++ 78.09% C 4.08% Cuda 1.04% Fortran 10.45% Python 0.07% JavaScript 0.06% CSS 0.04% Tcl 0.02% HTML 0.03%

carnd-path-planning-project's Introduction

CarND-Path-Planning-Project

Self-Driving Car Engineer Nanodegree Program

Simulator.

The Simulator which contains the Path Planning Project from the [releases tab (https://github.com/udacity/self-driving-car-sim/releases/tag/T3_v1.2).

To run the simulator on Mac/Linux, first make the binary file executable with the following command:

sudo chmod u+x {simulator_file_name}

The map of the highway is in data/highway_map.txt

Each waypoint in the list contains [x,y,s,dx,dy] values. x and y are the waypoint's map coordinate position, the s value is the distance along the road to get to that waypoint in meters, the dx and dy values define the unit normal vector pointing outward of the highway loop.

The highway's waypoints loop around so the frenet s value, distance along the road, goes from 0 to 6945.554.

##Build Instructions

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

Here is the data provided from the Simulator to the C++ Program

Main car's localization Data (No Noise)

["x"] The car's x position in map coordinates

["y"] The car's y position in map coordinates

["s"] The car's s position in frenet coordinates

["d"] The car's d position in frenet coordinates

["yaw"] The car's yaw angle in the map

["speed"] The car's speed in MPH

Previous path data given to the Planner

["previous_path_x"] The previous list of x points previously given to the simulator

["previous_path_y"] The previous list of y points previously given to the simulator

Previous path's end s and d values

["end_path_s"] The previous list's last point's frenet s value

["end_path_d"] The previous list's last point's frenet d value

Sensor Fusion Data, a list of all other car's attributes on the same side of the road. (No Noise)

["sensor_fusion"] A 2d vector of cars and then that car's [car's unique ID, car's x position in map coordinates, car's y position in map coordinates, car's x velocity in m/s, car's y velocity in m/s, car's s position in frenet coordinates, car's d position in frenet coordinates.

Dependencies

Implemetations

  1. Lane Following -basic trajectory generation (Line 187 -284)
    • Spline library was used to generate smooth driving curve
    • Use Frenet coordinate system to make sure the car stays in the lane(d is constant)
  2. Jerk minimizing and collision avoidance (line 146-169)
    • slowly increase speed to minimize the initial jerk
    • use sensor fusion data to decect the distance(s) between the ego car and the car in front of it.
    • if too close, reduce speed
  3. Lane changing (line 105- 186)
    • Try to stay in one lane until if the car in front is slow and there is saftey space of other lanes, change lane.
    • Back to middle lane : after lane changing, if middle lane is also clear, change back to middle lane
    • Recude lane change frequency by adding timer to count the time since last lane change ( ~10 sec)

Project Rubric Points

  1. The car is able to drive at least 4.32 miles without incident. 4.10 miles
  2. The car drives according to the speed limit.
    • No speed limit red message was seen.
  3. Max Acceleration and Jerk are not Exceeded.
  4. Car does not have collisions.
  5. The car stays in its lane, except for the time between changing lanes.
    • The car stays in its lane most of the time only changing lanes when necessary
  6. The car is able to change lanes
    • The car is able to smoothly change lanes when it makes sense to do so, such as when behind a slower moving car and an adjacent lane is clear of other traffic

carnd-path-planning-project's People

Contributors

xjtuyanshi avatar awbrown90 avatar baumanab avatar mvirgo avatar cseas avatar domluna avatar citlaligm avatar jorcus avatar dinoboy197 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.