Functions
coverage_path.cpp File Reference
#include "coverage_path.h"
Include dependency graph for coverage_path.cpp:

Go to the source code of this file.

Functions

void analyze_area (vector< geometry_msgs::Point > coords, geometry_msgs::Point &origin, double &rotation, double &width, double &height)
 Determine properties of an area. More...
 
void area_callback (const nav_msgs::OccupancyGrid::ConstPtr &msg)
 Callback function to receive the grid map. More...
 
void downsample (nav_msgs::OccupancyGrid &map)
 Decrease the resolution of a occupancy grid map. More...
 
bool generate_path (geometry_msgs::Point start)
 Generate an optimal coverage path for a given area. More...
 
bool get_path (nav_msgs::GetPlan::Request &req, nav_msgs::GetPlan::Response &res)
 Callback function to get the coverage path. More...
 
bool get_waypoint (cpswarm_msgs::GetWaypoint::Request &req, cpswarm_msgs::GetWaypoint::Response &res)
 Callback function to get the current waypoint of the path. More...
 
int main (int argc, char **argv)
 A ROS node that computes the optimal paths for area coverage with a swarm of CPSs. More...
 
void rotate (nav_msgs::OccupancyGrid &map, double angle)
 Rotate an occupancy grid map so the lower boundary is horizontal. More...
 
void swarm_state_callback (const cpswarm_msgs::ArrayOfStates::ConstPtr &msg)
 Callback function to receive the states of the other CPSs. More...
 

Function Documentation

void analyze_area ( vector< geometry_msgs::Point >  coords,
geometry_msgs::Point &  origin,
double &  rotation,
double &  width,
double &  height 
)

Determine properties of an area.

Parameters
coordsThe coordinates defining the area polygon.
originReturns the bottom left coordinate of the area.
rotationReturns the angle which the area has to be rotated so the lower boundary is horizontal.
widthReturns the width of the area after rotation.
heightReturns the height of the area after rotation.

Definition at line 11 of file coverage_path.cpp.

void area_callback ( const nav_msgs::OccupancyGrid::ConstPtr &  msg)

Callback function to receive the grid map.

Parameters
msgGrid map to be covered by this CPSs.

Definition at line 338 of file coverage_path.cpp.

void downsample ( nav_msgs::OccupancyGrid &  map)

Decrease the resolution of a occupancy grid map.

Parameters
mapA reference to the occupancy grid map to downsample.

Definition at line 148 of file coverage_path.cpp.

bool generate_path ( geometry_msgs::Point  start)

Generate an optimal coverage path for a given area.

Parameters
startThe starting position of the path.
Returns
Whether the path has been generated successfully.

Definition at line 224 of file coverage_path.cpp.

bool get_path ( nav_msgs::GetPlan::Request &  req,
nav_msgs::GetPlan::Response &  res 
)

Callback function to get the coverage path.

Parameters
reqPath planning request that is ignored.
resThe coverage path.
Returns
Whether the request succeeded.

Definition at line 290 of file coverage_path.cpp.

bool get_waypoint ( cpswarm_msgs::GetWaypoint::Request &  req,
cpswarm_msgs::GetWaypoint::Response &  res 
)

Callback function to get the current waypoint of the path.

Parameters
reqEmpty get waypoint request.
resThe current waypoint.
Returns
Whether the request succeeded.

Definition at line 310 of file coverage_path.cpp.

int main ( int  argc,
char **  argv 
)

A ROS node that computes the optimal paths for area coverage with a swarm of CPSs.

Parameters
argcNumber of command line arguments.
argvArray of command line arguments.
Returns
Success.

Definition at line 397 of file coverage_path.cpp.

void rotate ( nav_msgs::OccupancyGrid &  map,
double  angle 
)

Rotate an occupancy grid map so the lower boundary is horizontal.

Parameters
mapA reference to the occupancy grid map to rotate.
angleThe angle to rotate the map by.

Definition at line 71 of file coverage_path.cpp.

void swarm_state_callback ( const cpswarm_msgs::ArrayOfStates::ConstPtr &  msg)

Callback function to receive the states of the other CPSs.

Parameters
msgUUIDs and states of the other CPSs.

Definition at line 349 of file coverage_path.cpp.



coverage_path
Author(s): Micha Sende
autogenerated on Tue Jan 19 2021 03:30:03