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

bool generate_path ()
 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 pose_callback (const geometry_msgs::PoseStamped::ConstPtr &msg)
 Callback function for position updates. More...
 
void state_callback (const cpswarm_msgs::StateEvent::ConstPtr &msg)
 Callback function for state updates. More...
 
void swarm_callback (const cpswarm_msgs::ArrayOfStates::ConstPtr &msg)
 Callback function to receive the states of the other CPSs. More...
 

Function Documentation

◆ generate_path()

bool generate_path ( )

Generate an optimal coverage path for a given area.

Returns
Whether the path has been generated successfully.

Definition at line 7 of file coverage_path.cpp.

◆ get_path()

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 44 of file coverage_path.cpp.

◆ get_waypoint()

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 64 of file coverage_path.cpp.

◆ main()

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 169 of file coverage_path.cpp.

◆ pose_callback()

void pose_callback ( const geometry_msgs::PoseStamped::ConstPtr &  msg)

Callback function for position updates.

Parameters
msgPosition received from the CPS.

Definition at line 92 of file coverage_path.cpp.

◆ state_callback()

void state_callback ( const cpswarm_msgs::StateEvent::ConstPtr &  msg)

Callback function for state updates.

Parameters
msgState received from the CPS.

Definition at line 106 of file coverage_path.cpp.

◆ swarm_callback()

void swarm_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 120 of file coverage_path.cpp.



coverage_path
Author(s): Micha Sende
autogenerated on Thu Oct 31 2019 10:37:31