4 #include <cpswarm_msgs/TrackingAction.h> 5 #include <cpswarm_msgs/TargetPositionEvent.h> 18 cpswarm_msgs::TargetPositionEvent
target;
95 void lost_callback (
const cpswarm_msgs::TargetPositionEvent::ConstPtr& msg)
117 int main (
int argc,
char** argv)
120 init(argc, argv,
"uav_tracking");
128 ROS_ERROR(
"Could not set logger level!");
An implementation that allows to track a target by minimizing the offset between the cyber physical s...
void update_callback(const cpswarm_msgs::TargetPositionEvent::ConstPtr &msg)
Callback function to receive target update events.
ROSCONSOLE_DECL void notifyLoggerLevelsChanged()
behavior_state_t state
The state of the behavior algorithm.
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ROSCPP_DECL const std::string & getName()
void lost_callback(const cpswarm_msgs::TargetPositionEvent::ConstPtr &msg)
Callback function to receive event that target has been lost.
void setSucceeded(const Result &result=Result(), const std::string &text=std::string(""))
behavior_state_t step(cpswarm_msgs::TargetPositionEvent target)
Execute one cycle of the tracking algorithm.
void setPreempted(const Result &result=Result(), const std::string &text=std::string(""))
int main(int argc, char **argv)
Main function to be executed by ROS.
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
bool isPreemptRequested()
actionlib::SimpleActionServer< cpswarm_msgs::TrackingAction > action_server_t
An action server type that allows to start and stop the tracking task.
cpswarm_msgs::TargetPositionEvent target
The target being tracked.
void setAborted(const Result &result=Result(), const std::string &text=std::string(""))
void done_callback(const cpswarm_msgs::TargetPositionEvent::ConstPtr &msg)
Callback function to receive event that target has been done.
ROSCONSOLE_DECL bool set_logger_level(const std::string &name, levels::Level level)
ROSCPP_DECL void spinOnce()
#define ROSCONSOLE_DEFAULT_NAME
behavior_state_t
An enumeration for the state of the behavior algorithm.
void ActionCallback(const cpswarm_msgs::TrackingGoalConstPtr &goal, action_server_t *as)
Callback of the action server which executes the tracking task until it is preempted or finished...