Template Class SmaccActionClientBase

Inheritance Relationships

Base Type

Class Documentation

template<typename ActionType>
class SmaccActionClientBase : public smacc2::client_bases::ISmaccActionClient

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

Public Functions

inline SmaccActionClientBase(std::string actionServerName)
inline SmaccActionClientBase()
inline virtual ~SmaccActionClientBase()
inline virtual std::shared_ptr<rclcpp_action::ClientBase> getClientBase() override
inline virtual void onInitialize() override
inline void waitForServer()
template<typename EvType>
inline void postResultEvent(WrappedResult&)
template<typename TOrthogonal, typename TSourceObject>
inline void onOrthogonalAllocation()
template<typename T>
inline boost::signals2::connection onSucceeded(void (T::* callback)(WrappedResult&), T *object)
template<typename T>
inline boost::signals2::connection onSucceeded(std::function<void(WrappedResult&)> callback)
template<typename T>
inline boost::signals2::connection onAborted(void (T::* callback)(WrappedResult&), T *object)
template<typename T>
inline boost::signals2::connection onAborted(std::function<void(WrappedResult&)> callback)
template<typename T>
inline boost::signals2::connection onCancelled(void (T::* callback)(WrappedResult&), T *object)
template<typename T>
inline boost::signals2::connection onCancelled(std::function<void(WrappedResult&)> callback)
inline virtual bool cancelGoal() override
inline std::shared_future<typename GoalHandle::SharedPtr> sendGoal(Goal &goal, typename SmaccActionResultSignal::WeakPtr resultCallback = typename SmaccActionResultSignal::WeakPtr())

Public Members

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

Public Static Functions

static inline std::string getEventLabel()

Protected Functions

inline void onFeedback(typename GoalHandle::SharedPtr, const std::shared_ptr<const Feedback> feedback_msg)
inline void onResult(const WrappedResult &result_msg)

Protected Attributes

ActionClient::SharedPtr client_