Skip to content

treeplot.py

Uzair edited this page Oct 31, 2022 · 3 revisions

treeplot.py

Source

This script generates a plot using matplotlib visualizing all of the original waypoints, the safe_waypoints, the restricted region, and all valid paths.

Dependencies

matplotlib is used to make the plot for visualization.

tree is required to call all necessary functions for getting/generating data.

Functions

None.

Notes

Two parameters are set after the imports for easy access to changing those values:

DATA_SOURCE and INTERSECT_SAFE:

  • DATA_SOURCE is used to specify the file that should be passed to tree.parse_data().

  • INTERSECT_SAFE is a boolean value that changes whether the valid paths are allowed to pass within the safety margin. If True, paths are allowed to be closer to the restricted region than the safe waypoints are. If False, The valid paths must also respect the safety margin. This is a parameter in the tree.find_valid_connections() function.

Clone this wiki locally