#include "area_division.h"
Go to the source code of this file.
Functions | |
| void | behavior_state_callback (const cpswarm_msgs::StateEvent::ConstPtr &msg) |
| Callback function for behavior state updates. More... | |
| void | deinit () |
| Shutdown ROS communication. More... | |
| void | divide_area () |
| Divide the area of the grid map equally among multiple CPSs. More... | |
| void | division_callback (const cpswarm_msgs::AreaDivisionEvent::ConstPtr &msg) |
| Callback function to receive area division requests from other CPSs. More... | |
| void | downsample (nav_msgs::OccupancyGrid &map) |
| Decrease the resolution of a occupancy grid map. More... | |
| void | init () |
| Initialize this node. 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... | |
| geometry_msgs::Point | rotate (geometry_msgs::Point point, double angle) |
| Rotate a point by a given angle around the origin. More... | |
| double | rotate (nav_msgs::OccupancyGrid &map) |
| 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... | |
| void | sync () |
| Synchronize The CPSs by exchanging an event. More... | |
| void | to_sync () |
| Switch to the synchronization state. More... | |
| void | translate (nav_msgs::OccupancyGrid &map) |
| Shift a map to be aligned with the grid, i.e., the origin should be an even number. More... | |
| void | uuid_callback (const swarmros::String::ConstPtr &msg) |
| Callback function to receive the UUID from the communication library. More... | |
| void behavior_state_callback | ( | const cpswarm_msgs::StateEvent::ConstPtr & | msg | ) |
Callback function for behavior state updates.
| msg | State received from the CPS. |
Definition at line 28 of file area_division.cpp.
| void deinit | ( | ) |
Shutdown ROS communication.
Definition at line 236 of file area_division.cpp.
| void divide_area | ( | ) |
Divide the area of the grid map equally among multiple CPSs.
Definition at line 483 of file area_division.cpp.
| void division_callback | ( | const cpswarm_msgs::AreaDivisionEvent::ConstPtr & | msg | ) |
Callback function to receive area division requests from other CPSs.
| msg | UUIDs and position of the other CPS. |
Definition at line 50 of file area_division.cpp.
| void downsample | ( | nav_msgs::OccupancyGrid & | map | ) |
Decrease the resolution of a occupancy grid map.
| map | A reference to the occupancy grid map to downsample. |
Definition at line 409 of file area_division.cpp.
| void init | ( | ) |
Initialize this node.
Definition at line 170 of file area_division.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
A ROS node that divides the available area among a swarm of CPSs.
| argc | Number of command line arguments. |
| argv | Array of command line arguments. |
Definition at line 555 of file area_division.cpp.
| void map_callback | ( | const nav_msgs::OccupancyGrid::ConstPtr & | msg | ) |
Callback function to receive the grid map.
| msg | Global grid map. |
Definition at line 85 of file area_division.cpp.
| void pose_callback | ( | const geometry_msgs::PoseStamped::ConstPtr & | msg | ) |
Callback function for position updates.
| msg | Position received from the CPS. |
Definition at line 102 of file area_division.cpp.
| geometry_msgs::Point rotate | ( | geometry_msgs::Point | point, |
| double | angle | ||
| ) |
Rotate a point by a given angle around the origin.
| point | The point to rotate. |
| angle | The angle by which to rotate the point. |
Definition at line 285 of file area_division.cpp.
| double rotate | ( | nav_msgs::OccupancyGrid & | map | ) |
Rotate an occupancy grid map so the lower boundary is horizontal.
| map | A reference to the occupancy grid map to rotate. |
Definition at line 303 of file area_division.cpp.
| void swarm_state_callback | ( | const cpswarm_msgs::ArrayOfStates::ConstPtr & | msg | ) |
Callback function to receive the states of the other CPSs.
| msg | UUIDs and states of the other CPSs. |
Definition at line 116 of file area_division.cpp.
| void sync | ( | ) |
Synchronize The CPSs by exchanging an event.
Definition at line 260 of file area_division.cpp.
| void to_sync | ( | ) |
Switch to the synchronization state.
Definition at line 6 of file area_division.cpp.
| void translate | ( | nav_msgs::OccupancyGrid & | map | ) |
Shift a map to be aligned with the grid, i.e., the origin should be an even number.
| map | The map to shift. |
Definition at line 390 of file area_division.cpp.
| void uuid_callback | ( | const swarmros::String::ConstPtr & | msg | ) |
Callback function to receive the UUID from the communication library.
| msg | UUID of this node. |
Definition at line 162 of file area_division.cpp.