1 #ifndef SPANNING_TREE_H 2 #define SPANNING_TREE_H 5 #include <unordered_set> 9 #include <geometry_msgs/PoseArray.h> 10 #include <nav_msgs/OccupancyGrid.h> 31 vector<edge> get_mst_edges ();
37 geometry_msgs::PoseArray get_tree ();
44 void initialize_graph (nav_msgs::OccupancyGrid
gridmap,
bool connect4 =
true);
58 void add_edge (
int from,
int to,
int cost);
66 bool different_sets (
int a,
int b);
71 vector<unordered_set<int>>
nodes;
86 nav_msgs::OccupancyGrid
map;
89 #endif // SPANNING_TREE_H nav_msgs::OccupancyGrid map
The grid map that needs to be covered by the MST.
vector< edge > mst_edges
Edges in Minimal-Spanning Tree.
nav_msgs::OccupancyGrid gridmap
The grid map representing the environment to be covered.
A struct that provides the comparison of edge objects.
A class that generates a minimum-spanning-tree (MST) graph for a given grid map.
vector< unordered_set< int > > nodes
The sets of connected vertices.
priority_queue< edge, vector< edge >, compare_edge > edges
Priority queue of edge objects sorted by cost.