6 #include <unordered_set> 9 #include <geometry_msgs/Point.h> 10 #include <geometry_msgs/PoseArray.h> 11 #include <nav_msgs/OccupancyGrid.h> 12 #include <nav_msgs/Path.h> 39 geometry_msgs::PoseArray get_grid ();
53 geometry_msgs::Point
get_waypoint (geometry_msgs::Point position,
double tolerance);
60 void initialize_graph (nav_msgs::OccupancyGrid
gridmap,
bool connect4 =
true);
66 void initialize_tree (vector<edge> mst);
81 void add_edge(
int from,
int to,
int cost);
89 double dist (geometry_msgs::Point p1, geometry_msgs::Point p2);
96 geometry_msgs::Point get_wp (
int offset=0);
102 void remove_edge (
edge e);
107 deque<geometry_msgs::Point>
path;
112 unordered_set<edge, hash_edge>
edges;
122 nav_msgs::OccupancyGrid
map;
bool get_path(nav_msgs::GetPlan::Request &req, nav_msgs::GetPlan::Response &res)
Callback function to get the coverage path.
bool get_waypoint(cpswarm_msgs::GetWaypoint::Request &req, cpswarm_msgs::GetWaypoint::Response &res)
Callback function to get the current waypoint of the path.
nav_msgs::OccupancyGrid gridmap
The grid map representing the environment to be covered.
int wp
The current way point.
A class for representing edges.
vector< unordered_set< int > > nodes
The sets of connected vertices.
nav_msgs::OccupancyGrid map
The grid map that needs to be covered by the MST path.
deque< geometry_msgs::Point > path
The boustrophedon path.
bool generate_path()
Generate an optimal coverage path for a given area.
An class to compute the coverage path based on a minimum-spanning-tree (MST).
unordered_set< edge, hash_edge > edges
Priority queue of edge objects sorted by cost.