udacity / fcnd-issue-reports

You can use this repository to file issue reports with the Flying Car Nanodegree content.
1 stars 4 forks source link

Lesson 8.11 RRT Exercise Errors #170

Open tjphoton opened 6 years ago

tjphoton commented 6 years ago

Lesson 8.11 RRT Exercise, in RRT-Solution.ipynb,

  1. sklearn package is not included in the fcnd starter environment. need to do the # !{sys.executable} -m pip install sklearn trick to have it installed.

  2. In the obstacle visualization code cell plt.imshow(grid, cmap='Greys', origin='upper'), upper should be changed to lower to be consistent with the final visualization.

  3. In the code cell 11, it only check whether the new state is located on an obstacle, but did not check whether the new state is out of grid boundary, nor check whether the new edge to be added will pass through obstacles.

  4. Again, obstacle boundary index issue. When marked obstacles grid[30:40, 60:82] = 1, there are 10 grid cell index marked in the x direction: [30, 31, 32, 33, 34, 35, 36, 37, 38, 39]. In the visualization with plt.imshow(grid), region between 29.5 and 29.5 will be colored black. This caused feasible states with x axis between 29.5 and 30 is misleadingly in obstacle region.

tjphoton commented 6 years ago

RRT_edge_through.png RRT_obstacle_index.png

tjphoton commented 6 years ago

Correction: 10 grid cell index marked in the y direction

domluna commented 6 years ago

@tjphoton

1) scikit-learn has been added https://github.com/udacity/FCND-Term1-Starter-Kit/blob/master/environment.yml#L14 2) done 👍 3/4) I don't think there's much we can do about how matplotlib plots things. We can use int(np.round(x)) instead of int(x). This would be more in line with how matplotlib plots things. However, since we're not checking if there's an obstacle between 2 points there's still the possibly a line will be drawn through the corner of an obstacle.