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

Go to the source code of this file.

Functions

void divide_area ()
 Divide the area of the grid map equally among multiple CPSs. More...
 
bool get_area (nav_msgs::GetMap::Request &req, nav_msgs::GetMap::Response &res)
 Callback function to get the area assignment of this CPS. More...
 
int main (int argc, char **argv)
 A ROS node that divides the available area among a swarm of CPSs. More...
 
void map_callback (const nav_msgs::OccupancyGrid::ConstPtr &msg)
 Callback function to receive the grid map. More...
 
void pose_callback (const geometry_msgs::PoseStamped::ConstPtr &msg)
 Callback function for position updates. More...
 
void swarm_callback (const cpswarm_msgs::AreaDivisionEvent::ConstPtr &msg)
 Callback function to receive area division requests from other CPSs. More...
 
void sync ()
 Synchronize The CPSs by exchanging an event. More...
 
void uuid_callback (const swarmros::String::ConstPtr &msg)
 Callback function to receive the UUID from the communication library. More...
 

Function Documentation

◆ divide_area()

void divide_area ( )

Divide the area of the grid map equally among multiple CPSs.

Definition at line 6 of file area_division.cpp.

◆ get_area()

bool get_area ( nav_msgs::GetMap::Request &  req,
nav_msgs::GetMap::Response &  res 
)

Callback function to get the area assignment of this CPS.

Parameters
reqEmpty request.
resThe grid map assigned to this CPS.
Returns
Whether the request succeeded.

Definition at line 76 of file area_division.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

A ROS node that divides the available area among a swarm of CPSs.

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

Definition at line 172 of file area_division.cpp.

◆ map_callback()

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

Callback function to receive the grid map.

Parameters
msgMerged grid map from all CPSs.

Definition at line 159 of file area_division.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 112 of file area_division.cpp.

◆ swarm_callback()

void swarm_callback ( const cpswarm_msgs::AreaDivisionEvent::ConstPtr &  msg)

Callback function to receive area division requests from other CPSs.

Parameters
msgUUIDs and position of the other CPS.

Definition at line 126 of file area_division.cpp.

◆ sync()

void sync ( )

Synchronize The CPSs by exchanging an event.

Definition at line 42 of file area_division.cpp.

◆ uuid_callback()

void uuid_callback ( const swarmros::String::ConstPtr &  msg)

Callback function to receive the UUID from the communication library.

Parameters
msgUUID of this node.

Definition at line 103 of file area_division.cpp.



area_division
Author(s): Micha Sende
autogenerated on Thu Oct 31 2019 09:22:46