SMACC
|
#include <smacc_action_client_base.h>
Public Types | |
typedef actionlib::SimpleActionClient< ActionType > | ActionClient |
typedef actionlib::SimpleActionClient< ActionType > | GoalHandle |
typedef ActionClient::SimpleDoneCallback | SimpleDoneCallback |
typedef ActionClient::SimpleActiveCallback | SimpleActiveCallback |
typedef ActionClient::SimpleFeedbackCallback | SimpleFeedbackCallback |
Public Member Functions | |
ACTION_DEFINITION (ActionType) | |
SmaccActionClientBase (std::string actionServerName) | |
SmaccActionClientBase () | |
virtual | ~SmaccActionClientBase () |
virtual void | initialize () override |
template<typename EvType > | |
void | postResultEvent (ResultConstPtr result) |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
template<typename T > | |
boost::signals2::connection | onSucceeded (void(T::*callback)(ResultConstPtr &), T *object) |
template<typename T > | |
boost::signals2::connection | onSucceeded (std::function< void(ResultConstPtr &)> callback) |
template<typename T > | |
boost::signals2::connection | onAborted (void(T::*callback)(ResultConstPtr &), T *object) |
template<typename T > | |
boost::signals2::connection | onAborted (std::function< void(ResultConstPtr &)> callback) |
template<typename T > | |
boost::signals2::connection | onPreempted (void(T::*callback)(ResultConstPtr &), T *object) |
template<typename T > | |
boost::signals2::connection | onPreempted (std::function< void(ResultConstPtr &)> callback) |
template<typename T > | |
boost::signals2::connection | onRejected (void(T::*callback)(ResultConstPtr &), T *object) |
template<typename T > | |
boost::signals2::connection | onRejected (std::function< void(ResultConstPtr &)> callback) |
virtual void | cancelGoal () override |
virtual SimpleClientGoalState | getState () override |
void | sendGoal (Goal &goal) |
Public Member Functions inherited from smacc::client_bases::ISmaccActionClient | |
ISmaccActionClient () | |
virtual | ~ISmaccActionClient () |
std::string | getNamespace () const |
virtual void | cancelGoal ()=0 |
virtual SimpleClientGoalState | getState ()=0 |
Public Member Functions inherited from smacc::ISmaccClient | |
ISmaccClient () | |
virtual | ~ISmaccClient () |
virtual void | initialize () |
virtual std::string | getName () const |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
template<typename TComponent > | |
TComponent * | getComponent () |
template<typename TComponent > | |
TComponent * | getComponent (std::string name) |
virtual smacc::introspection::TypeInfo::Ptr | getType () |
ISmaccStateMachine * | getStateMachine () |
template<typename TSmaccSignal , typename T > | |
void | connectSignal (TSmaccSignal &signal, void(T::*callback)(), T *object) |
template<typename SmaccClientType > | |
void | requiresClient (SmaccClientType *&storage) |
void | getComponents (std::vector< std::shared_ptr< ISmaccComponent > > &components) |
Static Public Member Functions | |
static std::string | getEventLabel () |
Public Attributes | |
std::string | name_ |
rosnamespace path More... | |
smacc::SmaccSignal< void(const ResultConstPtr &)> | onSucceeded_ |
smacc::SmaccSignal< void(const ResultConstPtr &)> | onAborted_ |
smacc::SmaccSignal< void(const ResultConstPtr &)> | onPreempted_ |
smacc::SmaccSignal< void(const ResultConstPtr &)> | onRejected_ |
std::function< void(ResultConstPtr)> | postSuccessEvent |
std::function< void(ResultConstPtr)> | postAbortedEvent |
std::function< void(ResultConstPtr)> | postPreemptedEvent |
std::function< void(ResultConstPtr)> | postRejectedEvent |
std::function< void(FeedbackConstPtr)> | postFeedbackEvent |
SimpleDoneCallback | done_cb |
SimpleActiveCallback | active_cb |
SimpleFeedbackCallback | feedback_cb |
Protected Member Functions | |
void | onFeedback (const FeedbackConstPtr &feedback_msg) |
void | onResult (const SimpleClientGoalState &state, const ResultConstPtr &result_msg) |
Protected Member Functions inherited from smacc::ISmaccClient | |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createComponent (TArgs... targs) |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createNamedComponent (std::string name, TArgs... targs) |
void | setStateMachine (ISmaccStateMachine *stateMachine) |
void | setOrthogonal (ISmaccOrthogonal *orthogonal) |
Protected Attributes | |
std::shared_ptr< ActionClient > | client_ |
Protected Attributes inherited from smacc::client_bases::ISmaccActionClient | |
std::string | name_ |
Protected Attributes inherited from smacc::ISmaccClient | |
std::map< ComponentKey, std::shared_ptr< smacc::ISmaccComponent > > | components_ |
Definition at line 21 of file smacc_action_client_base.h.
typedef actionlib::SimpleActionClient<ActionType> smacc::client_bases::SmaccActionClientBase< ActionType >::ActionClient |
Definition at line 26 of file smacc_action_client_base.h.
typedef actionlib::SimpleActionClient<ActionType> smacc::client_bases::SmaccActionClientBase< ActionType >::GoalHandle |
Definition at line 27 of file smacc_action_client_base.h.
typedef ActionClient::SimpleActiveCallback smacc::client_bases::SmaccActionClientBase< ActionType >::SimpleActiveCallback |
Definition at line 30 of file smacc_action_client_base.h.
typedef ActionClient::SimpleDoneCallback smacc::client_bases::SmaccActionClientBase< ActionType >::SimpleDoneCallback |
Definition at line 29 of file smacc_action_client_base.h.
typedef ActionClient::SimpleFeedbackCallback smacc::client_bases::SmaccActionClientBase< ActionType >::SimpleFeedbackCallback |
Definition at line 31 of file smacc_action_client_base.h.
|
inline |
Definition at line 33 of file smacc_action_client_base.h.
|
inline |
Definition at line 39 of file smacc_action_client_base.h.
|
inlinevirtual |
Definition at line 51 of file smacc_action_client_base.h.
smacc::client_bases::SmaccActionClientBase< ActionType >::ACTION_DEFINITION | ( | ActionType | ) |
|
inlineoverridevirtual |
Implements smacc::client_bases::ISmaccActionClient.
Definition at line 159 of file smacc_action_client_base.h.
References smacc::client_bases::SmaccActionClientBase< ActionType >::client_, smacc::ISmaccClient::getName(), and smacc::client_bases::ISmaccActionClient::getNamespace().
Referenced by cl_move_base_z::CbUndoPathBackwards2::update().
|
inlinestatic |
Definition at line 45 of file smacc_action_client_base.h.
|
inlineoverridevirtual |
Implements smacc::client_bases::ISmaccActionClient.
Definition at line 172 of file smacc_action_client_base.h.
References smacc::client_bases::SmaccActionClientBase< ActionType >::client_.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onResult().
|
inlineoverridevirtual |
Reimplemented from smacc::ISmaccClient.
Reimplemented in cl_move_base_z::ClMoveBaseZ.
Definition at line 58 of file smacc_action_client_base.h.
References smacc::client_bases::SmaccActionClientBase< ActionType >::client_, and smacc::client_bases::SmaccActionClientBase< ActionType >::name_.
|
inline |
Definition at line 130 of file smacc_action_client_base.h.
References smacc::ISmaccStateMachine::createSignalConnection(), and smacc::ISmaccClient::getStateMachine().
|
inline |
Definition at line 124 of file smacc_action_client_base.h.
References smacc::ISmaccStateMachine::createSignalConnection(), and smacc::ISmaccClient::getStateMachine().
Referenced by cl_move_base_z::CbMoveBaseClientBehaviorBase::onOrthogonalAllocation().
|
inlineprotected |
Definition at line 197 of file smacc_action_client_base.h.
References smacc::client_bases::SmaccActionClientBase< ActionType >::postFeedbackEvent.
|
inline |
Definition at line 91 of file smacc_action_client_base.h.
References smacc::introspection::demangleType(), smacc::client_bases::SmaccActionClientBase< ActionType >::done_cb, smacc::client_bases::SmaccActionClientBase< ActionType >::feedback_cb, smacc::client_bases::SmaccActionClientBase< ActionType >::postAbortedEvent, smacc::ISmaccClient::postEvent(), smacc::client_bases::SmaccActionClientBase< ActionType >::postFeedbackEvent, smacc::client_bases::SmaccActionClientBase< ActionType >::postPreemptedEvent, smacc::client_bases::SmaccActionClientBase< ActionType >::postRejectedEvent, and smacc::client_bases::SmaccActionClientBase< ActionType >::postSuccessEvent.
|
inline |
Definition at line 142 of file smacc_action_client_base.h.
References smacc::ISmaccStateMachine::createSignalConnection(), and smacc::ISmaccClient::getStateMachine().
|
inline |
Definition at line 136 of file smacc_action_client_base.h.
References smacc::ISmaccStateMachine::createSignalConnection(), and smacc::ISmaccClient::getStateMachine().
|
inline |
Definition at line 154 of file smacc_action_client_base.h.
References smacc::ISmaccStateMachine::createSignalConnection(), and smacc::ISmaccClient::getStateMachine().
|
inline |
Definition at line 148 of file smacc_action_client_base.h.
References smacc::ISmaccStateMachine::createSignalConnection(), and smacc::ISmaccClient::getStateMachine().
|
inlineprotected |
Definition at line 202 of file smacc_action_client_base.h.
References smacc::ISmaccClient::getName(), smacc::client_bases::SmaccActionClientBase< ActionType >::getState(), smacc::client_bases::SmaccActionClientBase< ActionType >::onAborted_, smacc::client_bases::SmaccActionClientBase< ActionType >::onPreempted_, smacc::client_bases::SmaccActionClientBase< ActionType >::onRejected_, smacc::client_bases::SmaccActionClientBase< ActionType >::onSucceeded_, smacc::client_bases::SmaccActionClientBase< ActionType >::postAbortedEvent, smacc::client_bases::SmaccActionClientBase< ActionType >::postPreemptedEvent, smacc::client_bases::SmaccActionClientBase< ActionType >::postRejectedEvent, and smacc::client_bases::SmaccActionClientBase< ActionType >::postSuccessEvent.
|
inline |
Definition at line 118 of file smacc_action_client_base.h.
References smacc::ISmaccStateMachine::createSignalConnection(), and smacc::ISmaccClient::getStateMachine().
|
inline |
Definition at line 112 of file smacc_action_client_base.h.
References smacc::ISmaccStateMachine::createSignalConnection(), and smacc::ISmaccClient::getStateMachine().
Referenced by cl_move_base_z::CbMoveBaseClientBehaviorBase::onOrthogonalAllocation(), and cl_move_base_z::WaypointNavigator::sendNextGoal().
|
inline |
Definition at line 81 of file smacc_action_client_base.h.
References smacc::introspection::demangleSymbol(), and smacc::ISmaccClient::postEvent().
|
inline |
Definition at line 177 of file smacc_action_client_base.h.
References smacc::client_bases::SmaccActionClientBase< ActionType >::active_cb, smacc::client_bases::SmaccActionClientBase< ActionType >::client_, smacc::client_bases::SmaccActionClientBase< ActionType >::done_cb, smacc::client_bases::SmaccActionClientBase< ActionType >::feedback_cb, smacc::ISmaccClient::getName(), and smacc::client_bases::ISmaccActionClient::getNamespace().
Referenced by cl_move_base_z::CbNavigateGlobalPosition::execute(), cl_move_base_z::CbAbsoluteRotate::onEntry(), cl_move_base_z::CbNavigateBackwards::onEntry(), cl_move_base_z::CbNavigateForward::onEntry(), cl_move_base_z::CbRotate::onEntry(), cl_move_base_z::CbUndoPathBackwards::onEntry(), cl_move_base_z::CbUndoPathBackwards2::onEntry(), and cl_move_base_z::WaypointNavigator::sendNextGoal().
SimpleActiveCallback smacc::client_bases::SmaccActionClientBase< ActionType >::active_cb |
Definition at line 77 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::sendGoal().
|
protected |
Definition at line 195 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::cancelGoal(), smacc::client_bases::SmaccActionClientBase< ActionType >::getState(), smacc::client_bases::SmaccActionClientBase< ActionType >::initialize(), and smacc::client_bases::SmaccActionClientBase< ActionType >::sendGoal().
SimpleDoneCallback smacc::client_bases::SmaccActionClientBase< ActionType >::done_cb |
Definition at line 76 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), and smacc::client_bases::SmaccActionClientBase< ActionType >::sendGoal().
SimpleFeedbackCallback smacc::client_bases::SmaccActionClientBase< ActionType >::feedback_cb |
Definition at line 78 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), and smacc::client_bases::SmaccActionClientBase< ActionType >::sendGoal().
std::string smacc::client_bases::SmaccActionClientBase< ActionType >::name_ |
rosnamespace path
Definition at line 56 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::initialize(), and cl_move_base_z::CostmapSwitch::registerProxyFromDynamicReconfigureServer().
smacc::SmaccSignal<void(const ResultConstPtr &)> smacc::client_bases::SmaccActionClientBase< ActionType >::onAborted_ |
Definition at line 64 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onResult().
smacc::SmaccSignal<void(const ResultConstPtr &)> smacc::client_bases::SmaccActionClientBase< ActionType >::onPreempted_ |
Definition at line 65 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onResult().
smacc::SmaccSignal<void(const ResultConstPtr &)> smacc::client_bases::SmaccActionClientBase< ActionType >::onRejected_ |
Definition at line 66 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onResult().
smacc::SmaccSignal<void(const ResultConstPtr &)> smacc::client_bases::SmaccActionClientBase< ActionType >::onSucceeded_ |
Definition at line 63 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onResult().
std::function<void(ResultConstPtr)> smacc::client_bases::SmaccActionClientBase< ActionType >::postAbortedEvent |
Definition at line 70 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), and smacc::client_bases::SmaccActionClientBase< ActionType >::onResult().
std::function<void(FeedbackConstPtr)> smacc::client_bases::SmaccActionClientBase< ActionType >::postFeedbackEvent |
Definition at line 74 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onFeedback(), and smacc::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation().
std::function<void(ResultConstPtr)> smacc::client_bases::SmaccActionClientBase< ActionType >::postPreemptedEvent |
Definition at line 71 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), and smacc::client_bases::SmaccActionClientBase< ActionType >::onResult().
std::function<void(ResultConstPtr)> smacc::client_bases::SmaccActionClientBase< ActionType >::postRejectedEvent |
Definition at line 72 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), and smacc::client_bases::SmaccActionClientBase< ActionType >::onResult().
std::function<void(ResultConstPtr)> smacc::client_bases::SmaccActionClientBase< ActionType >::postSuccessEvent |
Definition at line 69 of file smacc_action_client_base.h.
Referenced by smacc::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), and smacc::client_bases::SmaccActionClientBase< ActionType >::onResult().