SMACC2
|
#include <cp_nav2_action_interface.hpp>
Public Types | |
using | ActionType = nav2_msgs::action::NavigateToPose |
using | Goal = ActionType::Goal |
using | Result = ActionType::Result |
using | Feedback = ActionType::Feedback |
using | GoalHandle = rclcpp_action::ClientGoalHandle<ActionType> |
using | WrappedResult = typename GoalHandle::WrappedResult |
using | ActionClient = smacc2::client_core_components::CpActionClient<ActionType> |
Public Member Functions | |
CpNav2ActionInterface ()=default | |
virtual | ~CpNav2ActionInterface ()=default |
std::shared_future< typename GoalHandle::SharedPtr > | sendNavigationGoal (const geometry_msgs::msg::PoseStamped &target) |
std::shared_future< typename GoalHandle::SharedPtr > | sendGoal (Goal &goal) |
bool | cancelNavigation () |
bool | isNavigationServerReady () const |
void | waitForNavigationServer () |
template<typename TOrthogonal , typename TSourceObject > | |
void | onComponentInitialization () |
void | onInitialize () override |
template<typename T > | |
boost::signals2::connection | onNavigationSucceeded (void(T::*callback)(const WrappedResult &), T *object) |
template<typename T > | |
boost::signals2::connection | onNavigationAborted (void(T::*callback)(const WrappedResult &), T *object) |
template<typename T > | |
boost::signals2::connection | onNavigationCancelled (void(T::*callback)(const WrappedResult &), T *object) |
template<typename T > | |
boost::signals2::connection | onNavigationFeedback (void(T::*callback)(const Feedback &), T *object) |
ActionClient * | getActionClient () const |
![]() | |
ISmaccComponent () | |
virtual | ~ISmaccComponent () |
virtual std::string | getName () const |
Public Attributes | |
smacc2::SmaccSignal< void(const WrappedResult &)> | onNavigationSucceeded_ |
smacc2::SmaccSignal< void(const WrappedResult &)> | onNavigationAborted_ |
smacc2::SmaccSignal< void(const WrappedResult &)> | onNavigationCancelled_ |
smacc2::SmaccSignal< void(const Feedback &)> | onNavigationFeedback_ |
std::function< void(const WrappedResult &)> | postNavigationSuccessEvent |
std::function< void(const WrappedResult &)> | postNavigationAbortedEvent |
std::function< void(const WrappedResult &)> | postNavigationCancelledEvent |
std::function< void(const Feedback &)> | postNavigationFeedbackEvent |
Private Member Functions | |
void | onNavigationSuccess (const WrappedResult &result) |
void | onNavigationAborted (const WrappedResult &result) |
void | onNavigationCancelled (const WrappedResult &result) |
void | onNavigationFeedback (const Feedback &feedback) |
Goal | createNavigationGoal (const geometry_msgs::msg::PoseStamped &target) |
Private Attributes | |
ActionClient * | actionClient_ = nullptr |
Additional Inherited Members | |
![]() | |
template<typename TOrthogonal , typename TClient > | |
void | onComponentInitialization () |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
template<typename TOrthogonal , typename TSourceObject > | |
void | onStateOrthogonalAllocation () |
template<typename TComponent > | |
void | requiresComponent (TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist=false) |
template<typename TComponent > | |
void | requiresComponent (std::string name, TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist=false) |
template<typename TClient > | |
void | requiresClient (TClient *&requiredClientStorage) |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createSiblingComponent (TArgs... targs) |
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
SmaccComponentType * | createSiblingNamedComponent (std::string name, TArgs... targs) |
rclcpp::Node::SharedPtr | getNode () |
rclcpp::Logger | getLogger () const |
ISmaccStateMachine * | getStateMachine () |
![]() | |
ISmaccStateMachine * | stateMachine_ |
ISmaccClient * | owner_ |
Definition at line 31 of file cp_nav2_action_interface.hpp.
using cl_nav2z::components::CpNav2ActionInterface::ActionClient = smacc2::client_core_components::CpActionClient<ActionType> |
Definition at line 41 of file cp_nav2_action_interface.hpp.
using cl_nav2z::components::CpNav2ActionInterface::ActionType = nav2_msgs::action::NavigateToPose |
Definition at line 35 of file cp_nav2_action_interface.hpp.
using cl_nav2z::components::CpNav2ActionInterface::Feedback = ActionType::Feedback |
Definition at line 38 of file cp_nav2_action_interface.hpp.
using cl_nav2z::components::CpNav2ActionInterface::Goal = ActionType::Goal |
Definition at line 36 of file cp_nav2_action_interface.hpp.
using cl_nav2z::components::CpNav2ActionInterface::GoalHandle = rclcpp_action::ClientGoalHandle<ActionType> |
Definition at line 39 of file cp_nav2_action_interface.hpp.
using cl_nav2z::components::CpNav2ActionInterface::Result = ActionType::Result |
Definition at line 37 of file cp_nav2_action_interface.hpp.
using cl_nav2z::components::CpNav2ActionInterface::WrappedResult = typename GoalHandle::WrappedResult |
Definition at line 40 of file cp_nav2_action_interface.hpp.
|
default |
|
virtualdefault |
|
inline |
Definition at line 89 of file cp_nav2_action_interface.hpp.
References actionClient_, smacc2::client_core_components::CpActionClient< ActionType >::cancelGoal(), and smacc2::ISmaccComponent::getLogger().
Referenced by cl_nav2z::CbNav2ZClientBehaviorBase::cancelGoal(), and cl_nav2z::CbAbortNavigation::onEntry().
|
inlineprivate |
Definition at line 246 of file cp_nav2_action_interface.hpp.
Referenced by sendNavigationGoal().
|
inline |
|
inline |
Definition at line 101 of file cp_nav2_action_interface.hpp.
References actionClient_, and smacc2::client_core_components::CpActionClient< ActionType >::isServerReady().
|
inline |
Definition at line 113 of file cp_nav2_action_interface.hpp.
References actionClient_, smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::postEvent(), postNavigationAbortedEvent, postNavigationCancelledEvent, postNavigationFeedbackEvent, and smacc2::ISmaccComponent::requiresComponent().
|
inlineoverridevirtual |
Reimplemented from smacc2::ISmaccComponent.
Definition at line 147 of file cp_nav2_action_interface.hpp.
References actionClient_, smacc2::ISmaccComponent::getLogger(), smacc2::client_core_components::CpActionClient< ActionType >::onAborted(), smacc2::client_core_components::CpActionClient< ActionType >::onCancelled(), smacc2::client_core_components::CpActionClient< ActionType >::onFeedback(), onNavigationAborted(), onNavigationCancelled(), onNavigationFeedback(), onNavigationSuccess(), and smacc2::client_core_components::CpActionClient< ActionType >::onSucceeded().
|
inlineprivate |
Definition at line 215 of file cp_nav2_action_interface.hpp.
References smacc2::ISmaccComponent::getLogger(), onNavigationAborted_, and postNavigationAbortedEvent.
|
inline |
Definition at line 177 of file cp_nav2_action_interface.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccComponent::getStateMachine().
Referenced by onInitialize(), cl_nav2z::CbNav2ZClientBehaviorBase::onNavigationAborted(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().
|
inlineprivate |
Definition at line 225 of file cp_nav2_action_interface.hpp.
References smacc2::ISmaccComponent::getLogger(), onNavigationCancelled_, and postNavigationCancelledEvent.
|
inline |
Definition at line 184 of file cp_nav2_action_interface.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccComponent::getStateMachine().
Referenced by onInitialize(), cl_nav2z::CbNav2ZClientBehaviorBase::onNavigationCancelled(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().
|
inlineprivate |
Definition at line 235 of file cp_nav2_action_interface.hpp.
References smacc2::ISmaccComponent::getLogger(), onNavigationFeedback_, and postNavigationFeedbackEvent.
|
inline |
Definition at line 192 of file cp_nav2_action_interface.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccComponent::getStateMachine().
Referenced by onInitialize().
|
inline |
Definition at line 169 of file cp_nav2_action_interface.hpp.
References smacc2::ISmaccStateMachine::createSignalConnection(), and smacc2::ISmaccComponent::getStateMachine().
Referenced by cl_nav2z::CbNav2ZClientBehaviorBase::onNavigationSucceeded(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().
|
inlineprivate |
Definition at line 205 of file cp_nav2_action_interface.hpp.
References smacc2::ISmaccComponent::getLogger(), onNavigationSucceeded_, and postNavigationSuccessEvent.
Referenced by onInitialize().
|
inline |
Definition at line 78 of file cp_nav2_action_interface.hpp.
References actionClient_, smacc2::ISmaccComponent::getLogger(), and smacc2::client_core_components::CpActionClient< ActionType >::sendGoal().
Referenced by cl_nav2z::CbNav2ZClientBehaviorBase::sendGoal(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().
|
inline |
Definition at line 59 of file cp_nav2_action_interface.hpp.
References actionClient_, createNavigationGoal(), smacc2::ISmaccComponent::getLogger(), and smacc2::client_core_components::CpActionClient< ActionType >::sendGoal().
|
inline |
Definition at line 103 of file cp_nav2_action_interface.hpp.
References actionClient_, and smacc2::client_core_components::CpActionClient< ActionType >::waitForServer().
|
private |
Definition at line 202 of file cp_nav2_action_interface.hpp.
Referenced by cancelNavigation(), getActionClient(), isNavigationServerReady(), onComponentInitialization(), onInitialize(), sendGoal(), sendNavigationGoal(), and waitForNavigationServer().
smacc2::SmaccSignal<void(const WrappedResult &)> cl_nav2z::components::CpNav2ActionInterface::onNavigationAborted_ |
Definition at line 45 of file cp_nav2_action_interface.hpp.
Referenced by onNavigationAborted().
smacc2::SmaccSignal<void(const WrappedResult &)> cl_nav2z::components::CpNav2ActionInterface::onNavigationCancelled_ |
Definition at line 46 of file cp_nav2_action_interface.hpp.
Referenced by onNavigationCancelled().
smacc2::SmaccSignal<void(const Feedback &)> cl_nav2z::components::CpNav2ActionInterface::onNavigationFeedback_ |
Definition at line 47 of file cp_nav2_action_interface.hpp.
Referenced by onNavigationFeedback().
smacc2::SmaccSignal<void(const WrappedResult &)> cl_nav2z::components::CpNav2ActionInterface::onNavigationSucceeded_ |
Definition at line 44 of file cp_nav2_action_interface.hpp.
Referenced by onNavigationSuccess().
std::function<void(const WrappedResult &)> cl_nav2z::components::CpNav2ActionInterface::postNavigationAbortedEvent |
Definition at line 51 of file cp_nav2_action_interface.hpp.
Referenced by onComponentInitialization(), and onNavigationAborted().
std::function<void(const WrappedResult &)> cl_nav2z::components::CpNav2ActionInterface::postNavigationCancelledEvent |
Definition at line 52 of file cp_nav2_action_interface.hpp.
Referenced by onComponentInitialization(), and onNavigationCancelled().
std::function<void(const Feedback &)> cl_nav2z::components::CpNav2ActionInterface::postNavigationFeedbackEvent |
Definition at line 53 of file cp_nav2_action_interface.hpp.
Referenced by onComponentInitialization(), and onNavigationFeedback().
std::function<void(const WrappedResult &)> cl_nav2z::components::CpNav2ActionInterface::postNavigationSuccessEvent |
Definition at line 50 of file cp_nav2_action_interface.hpp.
Referenced by onNavigationSuccess().