#include <ros/ros.h>#include <tf2/utils.h>#include <actionlib/server/simple_action_server.h>#include <geometry_msgs/Pose.h>#include <cpswarm_msgs/TaskAllocatedEvent.h>#include <cpswarm_msgs/TargetPositionEvent.h>#include <cpswarm_msgs/TargetTracking.h>#include <cpswarm_msgs/TargetAction.h>#include "lib/targets.h"
Go to the source code of this file.
Typedefs | |
| typedef actionlib::SimpleActionServer< cpswarm_msgs::TargetAction > | action_server_t |
| An action server type that allows to set the state of a target. More... | |
Functions | |
| void | assigned_callback (const cpswarm_msgs::TaskAllocatedEvent::ConstPtr &msg) |
| Callback function to receive information about targets assigned to a CPSs. More... | |
| void | done_callback (const cpswarm_msgs::TargetPositionEvent::ConstPtr &msg) |
| Callback function for incoming target done events. More... | |
| void | found_callback (const cpswarm_msgs::TargetPositionEvent::ConstPtr &msg) |
| Callback function to receive information about targets found by other CPSs. More... | |
| void | lost_callback (const cpswarm_msgs::TargetPositionEvent::ConstPtr &msg) |
| Callback function to receive information about targets lost by other CPSs. More... | |
| int | main (int argc, char **argv) |
| Main function to be executed by ROS. More... | |
| void | pose_callback (const geometry_msgs::PoseStamped::ConstPtr &msg) |
| Callback function for position updates. More... | |
| geometry_msgs::Quaternion | rotate (geometry_msgs::Quaternion rotation) |
| Compute the orientation resulting from the rotated CPS orientation. More... | |
| void | set_done (const cpswarm_msgs::TargetGoalConstPtr &goal, action_server_t *as) |
| Callback of the action server which sets the target state to done. More... | |
| void | tracking_callback (const cpswarm_msgs::TargetTracking::ConstPtr &msg) |
| Callback function for target position. More... | |
| void | update_callback (const cpswarm_msgs::TargetPositionEvent::ConstPtr &msg) |
| Callback function to receive updated information about targets from other CPSs. More... | |
| double | yaw () |
| Compute the current yaw orientation of the CPS. More... | |
Variables | |
| targets * | monitor |
| The targets being monitored. More... | |
| geometry_msgs::Pose | pose |
| Current position of the CPS. More... | |
| bool | pose_valid |
| Whether a valid position has been received. More... | |
| typedef actionlib::SimpleActionServer<cpswarm_msgs::TargetAction> action_server_t |
An action server type that allows to set the state of a target.
Definition at line 17 of file target_monitor.cpp.
| void assigned_callback | ( | const cpswarm_msgs::TaskAllocatedEvent::ConstPtr & | msg | ) |
Callback function to receive information about targets assigned to a CPSs.
| msg | ID and position of target. |
Definition at line 102 of file target_monitor.cpp.
| void done_callback | ( | const cpswarm_msgs::TargetPositionEvent::ConstPtr & | msg | ) |
Callback function for incoming target done events.
| msg | ID and last position of target. |
Definition at line 124 of file target_monitor.cpp.
| void found_callback | ( | const cpswarm_msgs::TargetPositionEvent::ConstPtr & | msg | ) |
Callback function to receive information about targets found by other CPSs.
| msg | ID and position of target. |
Definition at line 84 of file target_monitor.cpp.
| void lost_callback | ( | const cpswarm_msgs::TargetPositionEvent::ConstPtr & | msg | ) |
Callback function to receive information about targets lost by other CPSs.
| msg | ID and last known position of target. |
Definition at line 115 of file target_monitor.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Main function to be executed by ROS.
| argc | Number of command line arguments. |
| argv | Array of command line arguments. |
Definition at line 172 of file target_monitor.cpp.
| void pose_callback | ( | const geometry_msgs::PoseStamped::ConstPtr & | msg | ) |
Callback function for position updates.
| msg | Position received from the CPS. |
Definition at line 133 of file target_monitor.cpp.
| geometry_msgs::Quaternion rotate | ( | geometry_msgs::Quaternion | rotation | ) |
Compute the orientation resulting from the rotated CPS orientation.
Definition at line 49 of file target_monitor.cpp.
| void set_done | ( | const cpswarm_msgs::TargetGoalConstPtr & | goal, |
| action_server_t * | as | ||
| ) |
Callback of the action server which sets the target state to done.
| goal | The goal message received from the action client. |
| as | The action server offered by this node. |
Definition at line 151 of file target_monitor.cpp.
| void tracking_callback | ( | const cpswarm_msgs::TargetTracking::ConstPtr & | msg | ) |
Callback function for target position.
| msg | ID of target and translation between CPS and target as received from the OpenMV camera. |
Definition at line 64 of file target_monitor.cpp.
| void update_callback | ( | const cpswarm_msgs::TargetPositionEvent::ConstPtr & | msg | ) |
Callback function to receive updated information about targets from other CPSs.
| msg | ID and position of target. |
Definition at line 93 of file target_monitor.cpp.
| double yaw | ( | ) |
Compute the current yaw orientation of the CPS.
Definition at line 38 of file target_monitor.cpp.
| targets* monitor |
The targets being monitored.
Definition at line 22 of file target_monitor.cpp.
| geometry_msgs::Pose pose |
Current position of the CPS.
Definition at line 27 of file target_monitor.cpp.
| bool pose_valid |
Whether a valid position has been received.
Definition at line 32 of file target_monitor.cpp.