SMACC2
|
#include <smacc_action_client_base.hpp>
Public Types | |
typedef rclcpp_action::Client< ActionType > | ActionClient |
using | Goal = typename ActionClient::Goal |
using | Feedback = typename ActionClient::Feedback |
using | GoalHandle = rclcpp_action::ClientGoalHandle< ActionType > |
typedef GoalHandle::WrappedResult | WrappedResult |
using | SendGoalOptions = typename ActionClient::SendGoalOptions |
using | GoalResponseCallback = std::function< void(std::shared_future< typename GoalHandle::SharedPtr >)> |
using | FeedbackCallback = typename GoalHandle::FeedbackCallback |
using | ResultCallback = typename GoalHandle::ResultCallback |
using | CancelRequest = typename ActionType::Impl::CancelGoalService::Request |
using | CancelResponse = typename ActionType::Impl::CancelGoalService::Response |
using | CancelCallback = std::function< void(typename CancelResponse::SharedPtr)> |
typedef smacc2::SmaccSignal< void(const WrappedResult &)> | SmaccActionResultSignal |
Static Public Member Functions | |
static std::string | getEventLabel () |
Public Attributes | |
std::string | action_endpoint_ |
std::optional< std::shared_future< typename GoalHandle::SharedPtr > > | lastRequest_ |
std::optional< std::shared_future< typename CancelResponse::SharedPtr > > | lastCancelResponse_ |
SmaccActionResultSignal | onSucceeded_ |
SmaccActionResultSignal | onAborted_ |
SmaccActionResultSignal | onCancelled_ |
std::function< void(WrappedResult)> | postSuccessEvent |
std::function< void(WrappedResult)> | postAbortedEvent |
std::function< void(WrappedResult)> | postCancelledEvent |
std::function< void(const Feedback &)> | postFeedbackEvent |
FeedbackCallback | feedback_cb |
Protected Member Functions | |
void | onFeedback (typename GoalHandle::SharedPtr, const std::shared_ptr< const Feedback > feedback_msg) |
void | onResult (const WrappedResult &result_msg) |
Protected Member Functions inherited from smacc2::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) |
rclcpp::Node::SharedPtr | getNode () |
rclcpp::Logger | getLogger () |
Protected Attributes | |
ActionClient::SharedPtr | client_ |
Protected Attributes inherited from smacc2::client_bases::ISmaccActionClient | |
std::string | name_ |
Protected Attributes inherited from smacc2::ISmaccClient | |
std::map< ComponentKey, std::shared_ptr< smacc2::ISmaccComponent > > | components_ |
Definition at line 37 of file smacc_action_client_base.hpp.
typedef rclcpp_action::Client<ActionType> smacc2::client_bases::SmaccActionClientBase< ActionType >::ActionClient |
Definition at line 42 of file smacc_action_client_base.hpp.
using smacc2::client_bases::SmaccActionClientBase< ActionType >::CancelCallback = std::function<void(typename CancelResponse::SharedPtr)> |
Definition at line 61 of file smacc_action_client_base.hpp.
using smacc2::client_bases::SmaccActionClientBase< ActionType >::CancelRequest = typename ActionType::Impl::CancelGoalService::Request |
Definition at line 59 of file smacc_action_client_base.hpp.
using smacc2::client_bases::SmaccActionClientBase< ActionType >::CancelResponse = typename ActionType::Impl::CancelGoalService::Response |
Definition at line 60 of file smacc_action_client_base.hpp.
using smacc2::client_bases::SmaccActionClientBase< ActionType >::Feedback = typename ActionClient::Feedback |
Definition at line 50 of file smacc_action_client_base.hpp.
using smacc2::client_bases::SmaccActionClientBase< ActionType >::FeedbackCallback = typename GoalHandle::FeedbackCallback |
Definition at line 57 of file smacc_action_client_base.hpp.
using smacc2::client_bases::SmaccActionClientBase< ActionType >::Goal = typename ActionClient::Goal |
Definition at line 49 of file smacc_action_client_base.hpp.
using smacc2::client_bases::SmaccActionClientBase< ActionType >::GoalHandle = rclcpp_action::ClientGoalHandle<ActionType> |
Definition at line 51 of file smacc_action_client_base.hpp.
using smacc2::client_bases::SmaccActionClientBase< ActionType >::GoalResponseCallback = std::function<void(std::shared_future<typename GoalHandle::SharedPtr>)> |
Definition at line 55 of file smacc_action_client_base.hpp.
using smacc2::client_bases::SmaccActionClientBase< ActionType >::ResultCallback = typename GoalHandle::ResultCallback |
Definition at line 58 of file smacc_action_client_base.hpp.
using smacc2::client_bases::SmaccActionClientBase< ActionType >::SendGoalOptions = typename ActionClient::SendGoalOptions |
Definition at line 54 of file smacc_action_client_base.hpp.
typedef smacc2::SmaccSignal<void(const WrappedResult &)> smacc2::client_bases::SmaccActionClientBase< ActionType >::SmaccActionResultSignal |
Definition at line 63 of file smacc_action_client_base.hpp.
typedef GoalHandle::WrappedResult smacc2::client_bases::SmaccActionClientBase< ActionType >::WrappedResult |
Definition at line 52 of file smacc_action_client_base.hpp.
|
inline |
Definition at line 66 of file smacc_action_client_base.hpp.
References smacc2::client_bases::SmaccActionClientBase< ActionType >::action_endpoint_.
|
inline |
Definition at line 71 of file smacc_action_client_base.hpp.
References smacc2::client_bases::ISmaccActionClient::name_.
|
inlinevirtual |
Definition at line 73 of file smacc_action_client_base.hpp.
|
inlineoverridevirtual |
Implements smacc2::client_bases::ISmaccActionClient.
Definition at line 219 of file smacc_action_client_base.hpp.
References smacc2::client_bases::SmaccActionClientBase< ActionType >::client_, and smacc2::client_bases::SmaccActionClientBase< ActionType >::lastCancelResponse_.
Referenced by cl_nav2z::CbNav2ZClientBehaviorBase::cancelGoal(), cl_nitrosz::CbNav2ZClientBehaviorBase::cancelGoal(), cl_nav2z::CbAbortNavigation::onEntry(), and cl_nitrosz::CbAbortNavigation::onEntry().
|
inlineoverridevirtual |
Implements smacc2::client_bases::ISmaccActionClient.
Definition at line 75 of file smacc_action_client_base.hpp.
References smacc2::client_bases::SmaccActionClientBase< ActionType >::client_.
|
inlinestatic |
Definition at line 95 of file smacc_action_client_base.hpp.
|
inline |
Definition at line 176 of file smacc_action_client_base.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccClient::getStateMachine().
|
inline |
Definition at line 170 of file smacc_action_client_base.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccClient::getStateMachine().
|
inline |
Definition at line 188 of file smacc_action_client_base.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccClient::getStateMachine().
|
inline |
Definition at line 182 of file smacc_action_client_base.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccClient::getStateMachine().
|
inlineprotected |
Definition at line 382 of file smacc_action_client_base.hpp.
References smacc2::client_bases::SmaccActionClientBase< ActionType >::postFeedbackEvent.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation().
|
inlineoverridevirtual |
Reimplemented from smacc2::ISmaccClient.
Definition at line 77 of file smacc_action_client_base.hpp.
References smacc2::client_bases::SmaccActionClientBase< ActionType >::action_endpoint_, smacc2::client_bases::SmaccActionClientBase< ActionType >::client_, smacc2::introspection::demangleSymbol(), smacc2::ISmaccClient::getNode(), and smacc2::client_bases::ISmaccActionClient::name_.
|
inline |
Definition at line 134 of file smacc_action_client_base.hpp.
References smacc2::introspection::demangleType(), smacc2::client_bases::SmaccActionClientBase< ActionType >::feedback_cb, smacc2::ISmaccClient::getLogger(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onFeedback(), smacc2::client_bases::SmaccActionClientBase< ActionType >::postAbortedEvent, smacc2::client_bases::SmaccActionClientBase< ActionType >::postCancelledEvent, smacc2::ISmaccClient::postEvent(), smacc2::client_bases::SmaccActionClientBase< ActionType >::postFeedbackEvent, and smacc2::client_bases::SmaccActionClientBase< ActionType >::postSuccessEvent.
|
inlineprotected |
Definition at line 389 of file smacc_action_client_base.hpp.
References smacc2::ISmaccClient::getLogger(), smacc2::client_bases::ISmaccActionClient::getName(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onAborted_, smacc2::client_bases::SmaccActionClientBase< ActionType >::onCancelled_, smacc2::client_bases::SmaccActionClientBase< ActionType >::onSucceeded_, smacc2::client_bases::SmaccActionClientBase< ActionType >::postAbortedEvent, smacc2::client_bases::SmaccActionClientBase< ActionType >::postCancelledEvent, and smacc2::client_bases::SmaccActionClientBase< ActionType >::postSuccessEvent.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::sendGoal().
|
inline |
Definition at line 164 of file smacc_action_client_base.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccClient::getStateMachine().
|
inline |
Definition at line 158 of file smacc_action_client_base.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccClient::getStateMachine().
|
inline |
Definition at line 123 of file smacc_action_client_base.hpp.
References smacc2::introspection::demangleSymbol(), smacc2::ISmaccClient::getLogger(), and smacc2::ISmaccClient::postEvent().
|
inline |
Function called whenever feedback is received for the goal.
Function called when the result for the goal is received.
Definition at line 249 of file smacc_action_client_base.hpp.
References smacc2::client_bases::SmaccActionClientBase< ActionType >::client_, smacc2::introspection::demangleSymbol(), smacc2::client_bases::SmaccActionClientBase< ActionType >::feedback_cb, smacc2::ISmaccClient::getLogger(), smacc2::client_bases::ISmaccActionClient::getName(), and smacc2::client_bases::SmaccActionClientBase< ActionType >::onResult().
Referenced by cl_nav2z::CbNav2ZClientBehaviorBase::sendGoal(), cl_nitrosz::CbNav2ZClientBehaviorBase::sendGoal(), cl_nav2z::CpWaypointNavigator::sendNextGoal(), and cl_nitrosz::CpWaypointNavigator::sendNextGoal().
|
inline |
Definition at line 87 of file smacc_action_client_base.hpp.
References smacc2::client_bases::SmaccActionClientBase< ActionType >::client_, smacc2::ISmaccClient::getLogger(), and smacc2::client_bases::ISmaccActionClient::name_.
std::string smacc2::client_bases::SmaccActionClientBase< ActionType >::action_endpoint_ |
Definition at line 65 of file smacc_action_client_base.hpp.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::onInitialize(), and smacc2::client_bases::SmaccActionClientBase< ActionType >::SmaccActionClientBase().
|
protected |
Definition at line 380 of file smacc_action_client_base.hpp.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::cancelGoal(), smacc2::client_bases::SmaccActionClientBase< ActionType >::getClientBase(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onInitialize(), smacc2::client_bases::SmaccActionClientBase< ActionType >::sendGoal(), and smacc2::client_bases::SmaccActionClientBase< ActionType >::waitForServer().
FeedbackCallback smacc2::client_bases::SmaccActionClientBase< ActionType >::feedback_cb |
Definition at line 120 of file smacc_action_client_base.hpp.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), and smacc2::client_bases::SmaccActionClientBase< ActionType >::sendGoal().
std::optional<std::shared_future<typename CancelResponse::SharedPtr> > smacc2::client_bases::SmaccActionClientBase< ActionType >::lastCancelResponse_ |
Definition at line 103 of file smacc_action_client_base.hpp.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::cancelGoal().
std::optional<std::shared_future<typename GoalHandle::SharedPtr> > smacc2::client_bases::SmaccActionClientBase< ActionType >::lastRequest_ |
Definition at line 101 of file smacc_action_client_base.hpp.
SmaccActionResultSignal smacc2::client_bases::SmaccActionClientBase< ActionType >::onAborted_ |
Definition at line 106 of file smacc_action_client_base.hpp.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::onResult().
SmaccActionResultSignal smacc2::client_bases::SmaccActionClientBase< ActionType >::onCancelled_ |
Definition at line 109 of file smacc_action_client_base.hpp.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::onResult().
SmaccActionResultSignal smacc2::client_bases::SmaccActionClientBase< ActionType >::onSucceeded_ |
Definition at line 105 of file smacc_action_client_base.hpp.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::onResult().
std::function<void(WrappedResult)> smacc2::client_bases::SmaccActionClientBase< ActionType >::postAbortedEvent |
Definition at line 113 of file smacc_action_client_base.hpp.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), and smacc2::client_bases::SmaccActionClientBase< ActionType >::onResult().
std::function<void(WrappedResult)> smacc2::client_bases::SmaccActionClientBase< ActionType >::postCancelledEvent |
Definition at line 114 of file smacc_action_client_base.hpp.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), and smacc2::client_bases::SmaccActionClientBase< ActionType >::onResult().
std::function<void(const Feedback &)> smacc2::client_bases::SmaccActionClientBase< ActionType >::postFeedbackEvent |
Definition at line 118 of file smacc_action_client_base.hpp.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::onFeedback(), and smacc2::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation().
std::function<void(WrappedResult)> smacc2::client_bases::SmaccActionClientBase< ActionType >::postSuccessEvent |
Definition at line 112 of file smacc_action_client_base.hpp.
Referenced by smacc2::client_bases::SmaccActionClientBase< ActionType >::onOrthogonalAllocation(), and smacc2::client_bases::SmaccActionClientBase< ActionType >::onResult().