NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
ff_action.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  */
18 
19 #ifndef FF_UTIL_FF_ACTION_H_
20 #define FF_UTIL_FF_ACTION_H_
21 
22 // ROS includes
23 #include <ros/ros.h>
24 
25 // Actionlib includes
26 #include <actionlib/server/simple_action_server.h>
27 #include <actionlib/client/simple_action_client.h>
28 
29 // C++ includes
30 #include <functional>
31 #include <memory>
32 #include <string>
33 
34 namespace ff_util {
35 
37 
38 // Possible result codes
40  public:
41  enum Enum {
42  SUCCESS = 1, // Goal succeeded
43  PREEMPTED = 0, // Newer goal preempted previous goal
44  ABORTED = -1, // Goal was aborted by the server (cancelled goals don't call back!)
45  TIMEOUT_ON_CONNECT = -2, // The server did not accept the goal within CONNECT_TIME
46  TIMEOUT_ON_ACTIVE = -3, // The goal did not go active within ACTIVE TIME
47  TIMEOUT_ON_RESPONSE = -4, // No feedback or response was received within WATCHDOG TIME
48  TIMEOUT_ON_DEADLINE = -5, // No result received the given deadline
49  };
50 };
51 
52 // Wrapper around the simple action server that allows initialization outside the constructor
53 template < class ActionSpec >
55  public:
56  // Templated action definition
57  ACTION_DEFINITION(ActionSpec);
58 
59  // Callback types
60  typedef std::function < void (GoalConstPtr const&) > GoalCallbackType;
61  typedef std::function < void (void) > PreemptCallbackType;
62  typedef std::function < void (void) > CancelCallbackType;
63 
64  // Constructor
66 
67  // Destructor
69 
70  // Setters for callbacks
71  void SetGoalCallback(GoalCallbackType cb_goal) { cb_goal_ = cb_goal; }
72  void SetPreemptCallback(PreemptCallbackType cb_preempt) { cb_preempt_ = cb_preempt; }
73  void SetCancelCallback(CancelCallbackType cb_cancel) { cb_cancel_ = cb_cancel; }
74 
75  // Start the server
76  void Create(ros::NodeHandle *nh, std::string const& topic) {
77  sas_ = std::shared_ptr < actionlib::SimpleActionServer < ActionSpec > >(
78  new actionlib::SimpleActionServer < ActionSpec > (*nh, topic, false));
79  sas_->registerGoalCallback(boost::bind(&FreeFlyerActionServer::GoalCallback, this));
80  sas_->registerPreemptCallback(boost::bind(&FreeFlyerActionServer::PreemptCallback, this));
81  sas_->start();
82  }
83 
84  // Send incremental feedback for the current goal
85  void SendFeedback(Feedback const& feedback) {
86  if (!sas_) return;
87  sas_->publishFeedback(feedback);
88  }
89 
90  // Send the final result for the current goal
91  void SendResult(FreeFlyerActionState::Enum result_code, Result const& result) {
92  if (!sas_) return;
93  switch (result_code) {
94  case FreeFlyerActionState::SUCCESS: // Everything worked
95  sas_->setSucceeded(result);
96  break;
97  case FreeFlyerActionState::PREEMPTED: // Client B preempts client A
98  sas_->setPreempted(result);
99  break;
100  case FreeFlyerActionState::ABORTED: // Server encounters an error
101  sas_->setAborted(result);
102  default:
103  break;
104  }
105  }
106 
107  protected:
108  // In the case where one goal preempts another, the preempt callback called right before
109  // the new goal arrives. In the freeflyer project we differentiate between cancels() and
110  // preemptions. This intercepts the preempt call and decides what to do.
112  if (sas_->isNewGoalAvailable()) {
113  if (cb_preempt_)
114  cb_preempt_();
115  } else {
116  if (cb_cancel_)
117  cb_cancel_();
118  }
119  }
120 
121  // A new action has been called. We have to care of a special case where the goal is
122  // cancelled / preempted between arrival and the time this callback is called.
123  void GoalCallback() {
124  boost::shared_ptr<const Goal> goal = sas_->acceptNewGoal();
125  if (cb_goal_)
126  cb_goal_(goal);
127  }
128 
129  protected:
130  std::shared_ptr < actionlib::SimpleActionServer < ActionSpec > > sas_;
134 };
135 
137 
153 template < class ActionSpec >
155  private:
156  enum State {
157  WAITING_FOR_CREATE,
158  WAITING_FOR_CONNECT,
159  WAITING_FOR_GOAL,
160  WAITING_FOR_ACTIVE,
161  WAITING_FOR_RESPONSE,
162  WAITING_FOR_DEADLINE
163  };
164  static constexpr double DEFAULT_TIMEOUT_CONNECTED = 0.0;
165  static constexpr double DEFAULT_TIMEOUT_ACTIVE = 0.0;
166  static constexpr double DEFAULT_TIMEOUT_RESPONSE = 0.0;
167  static constexpr double DEFAULT_TIMEOUT_DEADLINE = 0.0;
168  static constexpr double DEFAULT_POLL_DURATION = 0.1;
169  static constexpr double DEFAULT_TIMEOUT_RESPONSE_DELAY = 0.1;
170 
171  public:
172  // Templated action definition
173  ACTION_DEFINITION(ActionSpec);
174 
175  // Callback types
176  typedef std::function < void (FeedbackConstPtr const&) > FeedbackCallbackType;
177  typedef std::function < void (FreeFlyerActionState::Enum, ResultConstPtr const&) > ResultCallbackType;
178  typedef std::function < void (void) > ConnectedCallbackType;
179  typedef std::function < void (void) > ActiveCallbackType;
180 
181  // Constructor
182  FreeFlyerActionClient() : state_(WAITING_FOR_CREATE),
183  to_connected_(DEFAULT_TIMEOUT_CONNECTED),
184  to_active_(DEFAULT_TIMEOUT_ACTIVE),
185  to_response_(DEFAULT_TIMEOUT_RESPONSE),
186  to_deadline_(DEFAULT_TIMEOUT_DEADLINE),
187  to_poll_(DEFAULT_POLL_DURATION),
188  to_response_delay_(DEFAULT_TIMEOUT_RESPONSE_DELAY) {}
189 
190  // Destructor
192 
193  // Setters for callbacks
194  void SetFeedbackCallback(FeedbackCallbackType cb_feedback) { cb_feedback_ = cb_feedback; }
195  void SetResultCallback(ResultCallbackType cb_result) { cb_result_ = cb_result; }
196  void SetConnectedCallback(ConnectedCallbackType cb_connected) { cb_connected_ = cb_connected; }
197  void SetActiveCallback(ActiveCallbackType cb_active) { cb_active_ = cb_active; }
198 
199  // Setters for timeouts
200  void SetConnectedTimeout(double to_connected) { to_connected_ = ros::Duration(to_connected); }
201  void SetActiveTimeout(double to_active) { to_active_ = ros::Duration(to_active); }
202  void SetResponseTimeout(double to_response) { to_response_ = ros::Duration(to_response); }
203  void SetDeadlineTimeout(double to_deadline) { to_deadline_ = ros::Duration(to_deadline); }
204  void SetPollTime(double to_poll) { to_poll_ = ros::Duration(to_poll); }
205 
206  // Initialize the action client and return whether connected by end of call
207  bool Create(ros::NodeHandle *nh, std::string const& topic) {
208  // Initialize all timers, but do not start them.
209  timer_connected_ = nh->createTimer(to_connected_,
211  timer_active_ = nh->createTimer(to_active_,
213  timer_response_ = nh->createTimer(to_response_,
215  timer_deadline_ = nh->createTimer(to_deadline_,
217  timer_poll_ = nh->createTimer(to_poll_,
218  &FreeFlyerActionClient::ConnectPollCallback, this, false, false);
219  timer_response_delay_ = nh->createTimer(to_response_delay_,
220  &FreeFlyerActionClient::ResultDelayCallback, this, true, false);
221  // Initialize the action client
222  sac_ = std::shared_ptr < actionlib::SimpleActionClient < ActionSpec > > (
223  new actionlib::SimpleActionClient < ActionSpec > (*nh, topic, false));
224  // Set the state
225  state_ = WAITING_FOR_GOAL;
226  // If we have a non-zero connect timeout, this means that we'd like to have the system poll
227  // for connect in the background and callback when the connection is established
228  if (!to_connected_.isZero()) {
229  state_ = WAITING_FOR_CONNECT;
232  ConnectPollCallback(ros::TimerEvent());
233  }
234  // Return whether the server connected by the end of this function
235  return sac_->isServerConnected();
236  }
237 
238  // Check if connected
239  bool IsConnected() {
240  return (sac_ && sac_->isServerConnected());
241  }
242 
243  // Send a new goal
244  bool SendGoal(Goal const& goal) {
245  if (!sac_) return false;
246  // Start the active timer waiting for goal to be accepted
249  // Send the goal
250  sac_->sendGoal(goal,
251  boost::bind(&FreeFlyerActionClient::ResultCallback, this, _1, _2),
252  boost::bind(&FreeFlyerActionClient::ActiveCallback, this),
253  boost::bind(&FreeFlyerActionClient::FeedbackCallback, this, _1));
254  // Update the state
255  state_ = WAITING_FOR_ACTIVE;
256  // Goal accepted
257  return true;
258  }
259 
260  // Cancel the goal that is currently running
261  bool CancelGoal() {
262  if (!sac_) return false;
263  // Only cancel a goal if we are in the correct state
264  switch (state_) {
265  case WAITING_FOR_ACTIVE:
266  case WAITING_FOR_RESPONSE:
267  case WAITING_FOR_DEADLINE:
268  StopAllTimers();
269  sac_->cancelGoal();
270  sac_->stopTrackingGoal();
271  state_ = WAITING_FOR_GOAL;
272  return true;
273  default:
274  break;
275  }
276  return false;
277  }
278 
279  protected:
280  // Simple wrapper around an optional timer
281  void StartOptionalTimer(ros::Timer & timer, ros::Duration const& duration) {
282  if (duration.isZero()) return;
283  timer.stop();
284  timer.setPeriod(duration);
285  timer.start();
286  }
287 
288  // Stop all timers
289  void StopAllTimers() {
290  timer_connected_.stop();
291  timer_active_.stop();
292  timer_response_.stop();
293  timer_deadline_.stop();
294  }
295 
296  // Completes the current goal
297  void Complete(FreeFlyerActionState::Enum state, ResultConstPtr const& result) {
298  // Stop all timers
299  StopAllTimers();
300  // Send response
301  if (cb_result_)
302  cb_result_(state, result);
303  // Reset state
304  state_ = WAITING_FOR_GOAL;
305  }
306 
307  // Called periodically until the server is connected
308  void ConnectPollCallback(ros::TimerEvent const& event) {
309  if (!sac_ || !sac_->isServerConnected()) return;
310  timer_connected_.stop();
311  timer_poll_.stop();
312  state_ = WAITING_FOR_GOAL;
313  if (cb_connected_)
314  cb_connected_();
315  }
316 
317  // Called when the server cannot be connected to
318  void ConnectedTimeoutCallback(ros::TimerEvent const& event) {
320  }
321 
322  // Called when the goal does not go active
323  void ActiveTimeoutCallback(ros::TimerEvent const& event) {
324  ROS_WARN("Freeflyer action timed out on going active.");
325  CancelGoal();
327  }
328 
329  // Called when the task deadline was not met
330  void DeadlineTimeoutCallback(ros::TimerEvent const& event) {
331  CancelGoal();
333  }
334 
335  // Called when no feedback/result is received within a certain period of time
336  void ResponseTimeoutCallback(ros::TimerEvent const& event) {
337  CancelGoal();
339  }
340 
341  // Goal is now active, restart timer and switch state
342  void ActiveCallback() {
343  timer_active_.stop();
344  // Start a responser timer if required
346  // If we want to know when goal goes active
347  if (cb_active_)
348  cb_active_();
349  // We are now waiting on a response
350  state_ = WAITING_FOR_RESPONSE;
351  }
352 
353  // Feedback received
354  void FeedbackCallback(FeedbackConstPtr const& feedback) {
355  timer_response_.stop();
356  // Start a responser timer if required
358  // Forward the feedback
359  if (cb_feedback_)
360  cb_feedback_(feedback);
361  }
362 
363  // Called when a result is received
364  void ResultCallback(actionlib::SimpleClientGoalState const& action_state, ResultConstPtr const& result) {
365  // Feedback has been received after a result before. Stop tracking the goal
366  // so that this doesn't happen
367  sac_->stopTrackingGoal();
368  // The response we send depends on the state
369  result_ = result;
370 
371  // The response we send depends on the state
372  if (action_state == actionlib::SimpleClientGoalState::SUCCEEDED)
374  else if (action_state == actionlib::SimpleClientGoalState::PREEMPTED)
376  else
378 
380  }
381 
382  // This delayed callback is necessary because on Ubuntu 20 / ROS noetic,
383  // an action is only considered finished once the ResultCallback returns.
384  // This raises the problem where, if another action of the same type is
385  // called in the ResultCallback or immediately afterwards, it returns
386  // failed because the previous action is technically not finished and
387  // returns an error.
388  void ResultDelayCallback(ros::TimerEvent const& event) {
389  // Call the result callback on the client side
391 
392  // Return to waiting for a goal
393  state_ = WAITING_FOR_GOAL;
394  }
395 
396  protected:
397  State state_;
398  ros::Duration to_connected_;
399  ros::Duration to_active_;
400  ros::Duration to_response_;
401  ros::Duration to_deadline_;
402  ros::Duration to_poll_;
403  ros::Duration to_response_delay_;
404  std::shared_ptr < actionlib::SimpleActionClient < ActionSpec > > sac_;
409  ros::Timer timer_connected_;
410  ros::Timer timer_active_;
411  ros::Timer timer_response_;
412  ros::Timer timer_deadline_;
413  ros::Timer timer_poll_;
415  // Save response
417  ResultConstPtr result_;
418 };
419 
420 } // namespace ff_util
421 
422 #endif // FF_UTIL_FF_ACTION_H_
ff_util::FreeFlyerActionClient::ConnectedCallbackType
std::function< void(void) > ConnectedCallbackType
Definition: ff_action.h:178
ff_util::FreeFlyerActionServer
Definition: ff_action.h:54
ff_util::FreeFlyerActionClient::timer_active_
ros::Timer timer_active_
Definition: ff_action.h:410
ff_util::FreeFlyerActionServer::ACTION_DEFINITION
ACTION_DEFINITION(ActionSpec)
ff_util::FreeFlyerActionClient::SetActiveCallback
void SetActiveCallback(ActiveCallbackType cb_active)
Definition: ff_action.h:197
ff_util::FreeFlyerActionClient::timer_response_
ros::Timer timer_response_
Definition: ff_action.h:411
ff_util::FreeFlyerActionServer::SetPreemptCallback
void SetPreemptCallback(PreemptCallbackType cb_preempt)
Definition: ff_action.h:72
ff_util::FreeFlyerActionClient::CancelGoal
bool CancelGoal()
Definition: ff_action.h:261
ff_util::FreeFlyerActionClient::ACTION_DEFINITION
ACTION_DEFINITION(ActionSpec)
ff_util::FreeFlyerActionClient::SendGoal
bool SendGoal(Goal const &goal)
Definition: ff_action.h:244
ff_util::FreeFlyerActionClient::ResponseTimeoutCallback
void ResponseTimeoutCallback(ros::TimerEvent const &event)
Definition: ff_action.h:336
ff_util::FreeFlyerActionClient::to_response_delay_
ros::Duration to_response_delay_
Definition: ff_action.h:403
ff_util::FreeFlyerActionServer::SendFeedback
void SendFeedback(Feedback const &feedback)
Definition: ff_action.h:85
ff_util::FreeFlyerActionClient::to_connected_
ros::Duration to_connected_
Definition: ff_action.h:398
ff_util::FreeFlyerActionClient::ConnectedTimeoutCallback
void ConnectedTimeoutCallback(ros::TimerEvent const &event)
Definition: ff_action.h:318
ff_util::FreeFlyerActionState::PREEMPTED
@ PREEMPTED
Definition: ff_action.h:43
ff_util::FreeFlyerActionServer::cb_goal_
GoalCallbackType cb_goal_
Definition: ff_action.h:131
ff_util::FreeFlyerActionClient::ActiveTimeoutCallback
void ActiveTimeoutCallback(ros::TimerEvent const &event)
Definition: ff_action.h:323
ff_util::FreeFlyerActionClient::SetPollTime
void SetPollTime(double to_poll)
Definition: ff_action.h:204
ff_util::FreeFlyerActionServer::FreeFlyerActionServer
FreeFlyerActionServer()
Definition: ff_action.h:65
ff_util::FreeFlyerActionClient::ResultDelayCallback
void ResultDelayCallback(ros::TimerEvent const &event)
Definition: ff_action.h:388
ff_util::FreeFlyerActionClient::cb_connected_
ConnectedCallbackType cb_connected_
Definition: ff_action.h:407
ff_util::FreeFlyerActionState::TIMEOUT_ON_ACTIVE
@ TIMEOUT_ON_ACTIVE
Definition: ff_action.h:46
ff_util::FreeFlyerActionClient
A wrapper class around the simple action client.
Definition: ff_action.h:154
ff_util::FreeFlyerActionClient::to_deadline_
ros::Duration to_deadline_
Definition: ff_action.h:401
ff_util::FreeFlyerActionClient::to_response_
ros::Duration to_response_
Definition: ff_action.h:400
ff_util::FreeFlyerActionClient::cb_result_
ResultCallbackType cb_result_
Definition: ff_action.h:406
ff_util::FreeFlyerActionClient::ResultCallback
void ResultCallback(actionlib::SimpleClientGoalState const &action_state, ResultConstPtr const &result)
Definition: ff_action.h:364
ff_util::FreeFlyerActionClient::~FreeFlyerActionClient
~FreeFlyerActionClient()
Definition: ff_action.h:191
ff_util::FreeFlyerActionClient::SetDeadlineTimeout
void SetDeadlineTimeout(double to_deadline)
Definition: ff_action.h:203
ff_util::FreeFlyerActionClient::StopAllTimers
void StopAllTimers()
Definition: ff_action.h:289
ff_util::FreeFlyerActionState::TIMEOUT_ON_CONNECT
@ TIMEOUT_ON_CONNECT
Definition: ff_action.h:45
ff_util::FreeFlyerActionClient::SetActiveTimeout
void SetActiveTimeout(double to_active)
Definition: ff_action.h:201
ff_util::FreeFlyerActionClient::SetResultCallback
void SetResultCallback(ResultCallbackType cb_result)
Definition: ff_action.h:195
ff_util::FreeFlyerActionClient::timer_connected_
ros::Timer timer_connected_
Definition: ff_action.h:409
ff_util::FreeFlyerActionState
Definition: ff_action.h:39
ff_util::FreeFlyerActionServer::SetGoalCallback
void SetGoalCallback(GoalCallbackType cb_goal)
Definition: ff_action.h:71
ff_util::FreeFlyerActionClient::ActiveCallback
void ActiveCallback()
Definition: ff_action.h:342
ff_util::FreeFlyerActionServer::sas_
std::shared_ptr< actionlib::SimpleActionServer< ActionSpec > > sas_
Definition: ff_action.h:130
ff_util::FreeFlyerActionServer::~FreeFlyerActionServer
~FreeFlyerActionServer()
Definition: ff_action.h:68
ff_util::FreeFlyerActionClient::cb_feedback_
FeedbackCallbackType cb_feedback_
Definition: ff_action.h:405
ff_util::FreeFlyerActionServer::GoalCallback
void GoalCallback()
Definition: ff_action.h:123
ff_util::FreeFlyerActionClient::state_
State state_
Definition: ff_action.h:397
ff_util::FreeFlyerActionClient::FeedbackCallback
void FeedbackCallback(FeedbackConstPtr const &feedback)
Definition: ff_action.h:354
ff_util::FreeFlyerActionClient::to_active_
ros::Duration to_active_
Definition: ff_action.h:399
ff_util::FreeFlyerActionServer::cb_cancel_
CancelCallbackType cb_cancel_
Definition: ff_action.h:133
ff_util::FreeFlyerActionClient::FeedbackCallbackType
std::function< void(FeedbackConstPtr const &) > FeedbackCallbackType
Definition: ff_action.h:176
ff_util::FreeFlyerActionClient::result_
ResultConstPtr result_
Definition: ff_action.h:417
ff_util::FreeFlyerActionServer::Create
void Create(ros::NodeHandle *nh, std::string const &topic)
Definition: ff_action.h:76
ff_util::FreeFlyerActionClient::timer_response_delay_
ros::Timer timer_response_delay_
Definition: ff_action.h:414
ff_util::FreeFlyerActionState::ABORTED
@ ABORTED
Definition: ff_action.h:44
ff_util::FreeFlyerActionServer::PreemptCallback
void PreemptCallback()
Definition: ff_action.h:111
ff_util::FreeFlyerActionClient::sac_
std::shared_ptr< actionlib::SimpleActionClient< ActionSpec > > sac_
Definition: ff_action.h:404
ff_util::FreeFlyerActionClient::Complete
void Complete(FreeFlyerActionState::Enum state, ResultConstPtr const &result)
Definition: ff_action.h:297
ff_util::FreeFlyerActionClient::state_response_
FreeFlyerActionState::Enum state_response_
Definition: ff_action.h:416
Result
Definition: partition_image_sequences.cc:48
ff_util::FreeFlyerActionServer::CancelCallbackType
std::function< void(void) > CancelCallbackType
Definition: ff_action.h:62
ff_util::FreeFlyerActionClient::timer_deadline_
ros::Timer timer_deadline_
Definition: ff_action.h:412
ff_util::FreeFlyerActionState::Enum
Enum
Definition: ff_action.h:41
ff_util::FreeFlyerActionClient::ConnectPollCallback
void ConnectPollCallback(ros::TimerEvent const &event)
Definition: ff_action.h:308
ff_util::FreeFlyerActionClient::Create
bool Create(ros::NodeHandle *nh, std::string const &topic)
Definition: ff_action.h:207
ff_util::FreeFlyerActionClient::cb_active_
ActiveCallbackType cb_active_
Definition: ff_action.h:408
ff_util::FreeFlyerActionClient::FreeFlyerActionClient
FreeFlyerActionClient()
Definition: ff_action.h:182
ff_util::FreeFlyerActionClient::SetFeedbackCallback
void SetFeedbackCallback(FeedbackCallbackType cb_feedback)
Definition: ff_action.h:194
ff_util::FreeFlyerActionClient::IsConnected
bool IsConnected()
Definition: ff_action.h:239
ff_util::FreeFlyerActionClient::StartOptionalTimer
void StartOptionalTimer(ros::Timer &timer, ros::Duration const &duration)
Definition: ff_action.h:281
ff_util::FreeFlyerActionClient::ActiveCallbackType
std::function< void(void) > ActiveCallbackType
Definition: ff_action.h:179
ff_util::FreeFlyerActionServer::SetCancelCallback
void SetCancelCallback(CancelCallbackType cb_cancel)
Definition: ff_action.h:73
ff_util::FreeFlyerActionState::SUCCESS
@ SUCCESS
Definition: ff_action.h:42
ff_util::FreeFlyerActionState::TIMEOUT_ON_DEADLINE
@ TIMEOUT_ON_DEADLINE
Definition: ff_action.h:48
ff_util
Definition: config_client.h:31
state
uint8_t state
Definition: signal_lights.h:90
ff_util::FreeFlyerActionServer::cb_preempt_
PreemptCallbackType cb_preempt_
Definition: ff_action.h:132
ff_util::FreeFlyerActionState::TIMEOUT_ON_RESPONSE
@ TIMEOUT_ON_RESPONSE
Definition: ff_action.h:47
ff_util::FreeFlyerActionClient::DeadlineTimeoutCallback
void DeadlineTimeoutCallback(ros::TimerEvent const &event)
Definition: ff_action.h:330
ff_util::FreeFlyerActionClient::SetResponseTimeout
void SetResponseTimeout(double to_response)
Definition: ff_action.h:202
ff_util::FreeFlyerActionServer::SendResult
void SendResult(FreeFlyerActionState::Enum result_code, Result const &result)
Definition: ff_action.h:91
ff_util::FreeFlyerActionClient::to_poll_
ros::Duration to_poll_
Definition: ff_action.h:402
ff_util::FreeFlyerActionClient::timer_poll_
ros::Timer timer_poll_
Definition: ff_action.h:413
ff_util::FreeFlyerActionServer::PreemptCallbackType
std::function< void(void) > PreemptCallbackType
Definition: ff_action.h:61
ff_util::FreeFlyerActionClient::SetConnectedCallback
void SetConnectedCallback(ConnectedCallbackType cb_connected)
Definition: ff_action.h:196
ff_util::FreeFlyerActionServer::GoalCallbackType
std::function< void(GoalConstPtr const &) > GoalCallbackType
Definition: ff_action.h:60
ff_util::FreeFlyerActionClient::SetConnectedTimeout
void SetConnectedTimeout(double to_connected)
Definition: ff_action.h:200
ff_util::FreeFlyerActionClient::ResultCallbackType
std::function< void(FreeFlyerActionState::Enum, ResultConstPtr const &) > ResultCallbackType
Definition: ff_action.h:177