6 #include <unordered_set> 9 #include <geometry_msgs/Point.h> 10 #include <geometry_msgs/PoseArray.h> 11 #include <geometry_msgs/Vector3.h> 12 #include <nav_msgs/OccupancyGrid.h> 13 #include <nav_msgs/Path.h> 49 geometry_msgs::Point
get_waypoint (geometry_msgs::Point position,
double tolerance);
57 void initialize_graph (nav_msgs::OccupancyGrid gridmap,
bool vertical =
false,
bool connect4 =
true);
66 void initialize_map (geometry_msgs::Point origin,
double rotation,
double width,
double height);
72 void initialize_tree (vector<edge> mst);
92 void add_edge(
int from,
int to,
int cost);
100 double dist (geometry_msgs::Point p1, geometry_msgs::Point p2);
107 geometry_msgs::Point get_wp (
int offset=0);
113 void remove_edge (
edge e);
118 deque<geometry_msgs::Point>
path;
123 unordered_set<edge, hash_edge>
edges;
133 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.
double rotation
The rotation of the map.
bool generate_path(geometry_msgs::Point start)
Generate an optimal coverage path for a given area.
int wp
The current way point.
double height
Height of the area to cover.
A class for representing edges.
bool vertical
Whether the sweeping pattern is vertical or horizontal.
double width
Width of the area to cover.
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.
An class to compute the coverage path based on a minimum-spanning-tree (MST).
geometry_msgs::Point origin
Coordinate of the bottom left bounding point of the area.
bool vertical
Whether the sweeping pattern is vertical or horizontal.
unordered_set< edge, hash_edge > edges
Priority queue of edge objects sorted by cost.