ASebastianRodriguez / SDCE_Motion-Planning-and-Decision-Making-for-Autonomous-Vehicles

Motion planning and decision making for autonomous vehicles project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Udacity Self Driving Car Engineer Course

Project Nº 5: SDCE_Motion-Planning-and-Decision-Making-for-Autonomous-Vehicles

alt text

1) Project Overview:

In this project, you will implement two of the main components of a traditional hierarchical planner: The Behavior Planner and the Motion Planner. Both will work in unison to be able to:

  • Avoid static objects (cars, bicycles and trucks) parked on the side of the road (but still invading the lane). The vehicle must avoid crashing with these vehicles by executing either a “nudge” or a “lane change” maneuver.
  • Handle any type of intersection (3-way, 4-way intersections and roundabouts) by STOPPING in all of them (by default).
  • Track the centerline on the traveling lane.

2) To accomplish this, you will implement:

  • Behavioral planning logic using Finite State Machines - FSM.
  • Static objects collision checking.
  • Path and trajectory generation using cubic spirals.
  • Best trajectory selection though a cost function evaluation. This cost function will mainly perform a collision check and a proximity check to bring cost higher as we get closer or collide with objects but maintaining a bias to stay closer to the lane center line.

3) Modify the following files:

  • behavior_planner_FSM.cpp
  • cost_functions.cpp
  • motion_planner.cpp
  • velocity_profile_generator.cpp

4) Project Setup Instructions:

Follow the series of the commands in the workspace to launch the CARLA simulator:

New terminal window:

1. su - student
// Will say permission denied, ignore and continue 
2. cd /opt/carla-simulator/
3. SDL_VIDEODRIVER=offscreen ./CarlaUE4.sh -opengl

New terminal window:

4. git clone https://github.com/udacity/nd013-c5-planning-starter.git
5. cd nd013-c5-planning-starter/project
6. ./install-ubuntu.sh
7. cd starter_files/
8. cmake .
9. make
10. cd nd013-c5-planning-starter/project
11. ./run_main.sh
// This will silently fail 
12. ctrl + C to stop 
13. ./run_main.sh again
14. Go to desktop mode to see CARLA

// If error bind is already in use, or address already being used
ps -aux | grep carla
kill id

5) Results:

I tried the simulation with several configurations, this simulation ran using:

  • P_NUM_PATHS = 5
  • P_NUM_POINTS_IN_SPIRAL = 30

FIGURE 1: Starting the simulation.
alt text

FIGURE 2: Driving straight.
alt text

FIGURE 3: Crossing a solid line to the right.
alt text

FIGURE 4: Stopping at the end of the path.
alt text

About

Motion planning and decision making for autonomous vehicles project.


Languages

Language:C++ 90.7%Language:Python 7.8%Language:Makefile 1.1%Language:CMake 0.4%Language:Shell 0.0%