NASA Astrobee Robot Software
0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
|
A wrapper class around the simple action client. More...
#include <ff_action.h>
Public Types | |
typedef std::function< void(FeedbackConstPtr const &) > | FeedbackCallbackType |
typedef std::function< void(FreeFlyerActionState::Enum, ResultConstPtr const &) > | ResultCallbackType |
typedef std::function< void(void) > | ConnectedCallbackType |
typedef std::function< void(void) > | ActiveCallbackType |
Public Member Functions | |
ACTION_DEFINITION (ActionSpec) | |
FreeFlyerActionClient () | |
~FreeFlyerActionClient () | |
void | SetFeedbackCallback (FeedbackCallbackType cb_feedback) |
void | SetResultCallback (ResultCallbackType cb_result) |
void | SetConnectedCallback (ConnectedCallbackType cb_connected) |
void | SetActiveCallback (ActiveCallbackType cb_active) |
void | SetConnectedTimeout (double to_connected) |
void | SetActiveTimeout (double to_active) |
void | SetResponseTimeout (double to_response) |
void | SetDeadlineTimeout (double to_deadline) |
void | SetPollTime (double to_poll) |
bool | Create (ros::NodeHandle *nh, std::string const &topic) |
bool | IsConnected () |
bool | SendGoal (Goal const &goal) |
bool | CancelGoal () |
Protected Member Functions | |
void | StartOptionalTimer (ros::Timer &timer, ros::Duration const &duration) |
void | StopAllTimers () |
void | Complete (FreeFlyerActionState::Enum state, ResultConstPtr const &result) |
void | ConnectPollCallback (ros::TimerEvent const &event) |
void | ConnectedTimeoutCallback (ros::TimerEvent const &event) |
void | ActiveTimeoutCallback (ros::TimerEvent const &event) |
void | DeadlineTimeoutCallback (ros::TimerEvent const &event) |
void | ResponseTimeoutCallback (ros::TimerEvent const &event) |
void | ActiveCallback () |
void | FeedbackCallback (FeedbackConstPtr const &feedback) |
void | ResultCallback (actionlib::SimpleClientGoalState const &action_state, ResultConstPtr const &result) |
void | ResultDelayCallback (ros::TimerEvent const &event) |
Protected Attributes | |
State | state_ |
ros::Duration | to_connected_ |
ros::Duration | to_active_ |
ros::Duration | to_response_ |
ros::Duration | to_deadline_ |
ros::Duration | to_poll_ |
ros::Duration | to_response_delay_ |
std::shared_ptr< actionlib::SimpleActionClient< ActionSpec > > | sac_ |
FeedbackCallbackType | cb_feedback_ |
ResultCallbackType | cb_result_ |
ConnectedCallbackType | cb_connected_ |
ActiveCallbackType | cb_active_ |
ros::Timer | timer_connected_ |
ros::Timer | timer_active_ |
ros::Timer | timer_response_ |
ros::Timer | timer_deadline_ |
ros::Timer | timer_poll_ |
ros::Timer | timer_response_delay_ |
FreeFlyerActionState::Enum | state_response_ |
ResultConstPtr | result_ |
A wrapper class around the simple action client.
While useful, the simple action client lacks a few features that prove useful in the context of the freeflyer project. Notably, timeouts are not enforced, which leads to the potential situation where the server disappears, and the client remains waiting for a response. To avoid needing to add timers alongside each client, this class internally creates timers to manage the following situations. Zero-values timeouts (default value) are equivalent to no timeout.
typedef std::function< void (void) > ff_util::FreeFlyerActionClient< ActionSpec >::ActiveCallbackType |
typedef std::function< void (void) > ff_util::FreeFlyerActionClient< ActionSpec >::ConnectedCallbackType |
typedef std::function< void (FeedbackConstPtr const&) > ff_util::FreeFlyerActionClient< ActionSpec >::FeedbackCallbackType |
typedef std::function< void (FreeFlyerActionState::Enum, ResultConstPtr const&) > ff_util::FreeFlyerActionClient< ActionSpec >::ResultCallbackType |
|
inline |
|
inline |
ff_util::FreeFlyerActionClient< ActionSpec >::ACTION_DEFINITION | ( | ActionSpec | ) |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |