Skip to content

Commit

Permalink
Update model_documentation.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Palazzi authored Aug 24, 2017
1 parent 50adb2c commit 688b233
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions project_11_path_planning/model_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,17 @@ Here's a bullet list of rubric points along with an explanation of how constrain
The rubric sets as hard constraint the fact that car does not exceed a total acceleration of 10 m/s^2 and a jerk of 10 m/s^3. This is obtained by setting the initial speed of vehicle to zero, and [gradually accelerating](https://github.com/ndrplz/self-driving-car/blob/7b0d9e057931667a04422649fee6d017b3ef7475/project_11_path_planning/src/main.cpp#L181-L182) until the vehicle has reached the maximum speed allowed (either by the speed limit or by the current road situation).

- **Car does not have collisions.**

Under the reasonable assumption that other cars drive reasonably well, the main risk to hit another car is *rear-ending*. This is avoided using [sensor fusion data to make sure that no other car is dangerously close](https://github.com/ndrplz/self-driving-car/blob/7b0d9e057931667a04422649fee6d017b3ef7475/project_11_path_planning/src/main.cpp#L133-L134) in our same lane. If this is the case, the car [gracefully decelerates](https://github.com/ndrplz/self-driving-car/blob/7b0d9e057931667a04422649fee6d017b3ef7475/project_11_path_planning/src/main.cpp#L179-L180) until the situation gets safer.

Another possibly dangerous situation is the one of *lane changing*. This will be examined in the next point.

- **The car stays in its lane, except for the time between changing lanes.**

One of the first things that we would demand from a self-driving car is being able to drive inside a certain lane. In our framework, we know that each lane is 4m width, and that there are three lanes for each direction of travel.

For the task of lane keeping we'll rely on *Frenet coordinates*, which measure longitudinal (s) and lateral (d) motion along the road and are much easier to deal with w.r.t. euclidean ones. By the way, the code for converting between Eunclidean and Frenet coordinates is in [`coords_transform.h`](https://github.com/ndrplz/self-driving-car/blob/master/project_11_path_planning/src/coords_transform.h).

In order for the car to keep the lane, [three future waypoints are generated equally spaced 30m, 60m and 90m before the car](https://github.com/ndrplz/self-driving-car/blob/50adb2c54ac2e0d5c0878f4c3c73894275ab20c3/project_11_path_planning/src/main.cpp#L215-L218) respectively. These are quite far apart one from the other, so in order to obtain a smooth trajectory a spline is used to interpolate intermediate locations.

- **The car is able to change lanes**

0 comments on commit 688b233

Please sign in to comment.