networkx==2.1, bresenham, scipy packages need to be installed
Here I will consider the rubric points individually and describe how I addressed each point in my implementation.
1. Provide a Writeup / README that includes all the rubric points and how you addressed each one. You can submit your writeup as markdown or pdf.
You're reading it! Below I describe how I addressed each rubric point and where in my code each point is handled.
motion_planning.py
is a modified version of backyard_flyer_solution.py
:
- One more PLANNING state is added between ARMING and TAKEOFF
plan_path
function is invoked during PLANNING state which does the actual path planning (with help ofplanning_utils.py
) and populates waypoints array:- initialize local and globabl position, and set home location
- read obstacles map and convert it to grid with given altitude and safety margin using
create_grid
function fromplanning_utils.py
- define start and goal locatons on the grid
- find a path using a-star algorythm from
planning_utils.py
- populate waypoints array from path
- There is also
send_waypoints
function to visualize waypoints in simulator - after the PLANNING state, it goes to TAKEOFF and WAYPOINT states to follow the waypoints one by one till the last waypoint is reached
- when the last waypoint is reached, it goes to LANDING and then DISARMED state
- Read first line of colliders.csv, parse it and put into dictionary
- Use 'lon0' and 'lat0' to get longitude and latitude
- Use the self.set_home_position() method to set global home
Determine your local position relative to global home:
- Use global_to_local() with global_position and global_home
- Set grid_start to local position adjusted to the north and east offsets from the obstacle grid
- Choose multiple geo coordinates on the map that can be reached
- Pick randomly on of the destinations
- Create Voronoi graph as described in Lesson 6.15 (Graph Search Exercise)
- Set the weight of the edges to the Euclidean distance between the vertices
- Use bresenham method to check that edges don't collide with obstacles
- Perform A-star on the graph to find the path
- Use collinearity check to prune the path - from exercise in lesson 6.9 (Putting it Together Exercise)
- Increase the epsilon in collinearity check function to get rid of 'almost collinear' points
Double check that you've met specifications for each of the rubric points.
Maybe next time :(