Feature/stationary obstacle avoidance #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Complete redesign of the original avoidance algorithm to use the Informed RRT* algorithm.
3 files are included,
path_finder.py
andhelpers.py
are the main important files.plotter.py
is optional but very handy for visualizing the results.An example of the usage is in the bottom of
path_finder.py
. To use it just callpath_finder.solve()
and pass in data for the boundary, obstacles, and waypoints in the original json format (list of dictionaries). Optional parameters are available for plotting.Calling
solve()
takes a complete list of waypoints > 2 and returns an unobstructed route with possibly more waypoints than before (depending on number of obstructions). This function can be used for solving a path between only two waypoints, or a large list of waypoints. It returns a list of tuples in the format of(latitude, longitude, altitude)
.The algorithm does not work in full 3 dimensions. It solves a path in 2d space and then adds altitudes later. Altitude for original waypoints is known (from the given json data). Altitude for new points is calculated by taking the percentage of distance the new point is from the starting point and multiplying it by the difference in height between the start and goal points. This results in an even ascent or descent between start and goal points (if the start and goal points are different altitudes, otherwise all points will be a constant height).