SMACC2
Loading...
Searching...
No Matches
cl_nav2z::ClNav2Z Class Reference

#include <cl_nav2z.hpp>

Inheritance diagram for cl_nav2z::ClNav2Z:
Inheritance graph
Collaboration diagram for cl_nav2z::ClNav2Z:
Collaboration graph

Public Types

using ActionType = nav2_msgs::action::NavigateToPose
 
using GoalHandle = rclcpp_action::ClientGoalHandle<ActionType>
 
using WrappedResult = typename GoalHandle::WrappedResult
 
using Feedback = typename ActionType::Feedback
 

Public Member Functions

 ClNav2Z (std::string actionServerName="/navigate_to_pose")
 
 ~ClNav2Z () override=default
 
template<typename TOrthogonal , typename TClient >
void onComponentInitialization ()
 
- Public Member Functions inherited from smacc2::ISmaccClient
 ISmaccClient ()
 
virtual ~ISmaccClient ()
 
 ISmaccClient (const ISmaccClient &)=delete
 
ISmaccClient & operator= (const ISmaccClient &)=delete
 
 ISmaccClient (ISmaccClient &&)=delete
 
ISmaccClient & operator= (ISmaccClient &&)=delete
 
virtual void onInitialize ()
 
virtual std::string getName () const
 
template<typename TComponent >
TComponent * getComponent ()
 
template<typename TComponent >
TComponent * getComponent (const std::string &name)
 
template<typename TComponent >
TComponent * getComponent (int index)
 
virtual smacc2::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)
 
const std::vector< std::shared_ptr< ISmaccComponent > > & iterateComponents () const
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 

Private Attributes

std::string actionServerName_
 

Additional Inherited Members

- Protected Member Functions inherited from smacc2::ISmaccClient
template<typename TOrthogonal , typename TClient >
void onComponentInitialization ()
 
template<typename TOrthogonal , typename TSourceObject >
void onStateOrthogonalAllocation ()
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createComponent (const TArgs &... targs)
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createNamedComponent (const std::string &name, const TArgs &... targs)
 
rclcpp::Node::SharedPtr getNode ()
 
rclcpp::Logger getLogger ()
 
- Protected Attributes inherited from smacc2::ISmaccClient
std::map< ComponentKey, std::shared_ptr< smacc2::ISmaccComponent > > components_
 

Detailed Description

Definition at line 28 of file cl_nav2z.hpp.

Member Typedef Documentation

◆ ActionType

using cl_nav2z::ClNav2Z::ActionType = nav2_msgs::action::NavigateToPose

Definition at line 32 of file cl_nav2z.hpp.

◆ Feedback

using cl_nav2z::ClNav2Z::Feedback = typename ActionType::Feedback

Definition at line 35 of file cl_nav2z.hpp.

◆ GoalHandle

using cl_nav2z::ClNav2Z::GoalHandle = rclcpp_action::ClientGoalHandle<ActionType>

Definition at line 33 of file cl_nav2z.hpp.

◆ WrappedResult

using cl_nav2z::ClNav2Z::WrappedResult = typename GoalHandle::WrappedResult

Definition at line 34 of file cl_nav2z.hpp.

Constructor & Destructor Documentation

◆ ClNav2Z()

cl_nav2z::ClNav2Z::ClNav2Z ( std::string actionServerName = "/navigate_to_pose")
inline

Definition at line 38 of file cl_nav2z.hpp.

39 : actionServerName_(std::move(actionServerName))
40 {
41 }
std::string actionServerName_
Definition cl_nav2z.hpp:65

◆ ~ClNav2Z()

cl_nav2z::ClNav2Z::~ClNav2Z ( )
overridedefault

Member Function Documentation

◆ onComponentInitialization()

template<typename TOrthogonal , typename TClient >
void cl_nav2z::ClNav2Z::onComponentInitialization ( )
inline

Definition at line 47 of file cl_nav2z.hpp.

48 {
49 // Create core action client component
50 this->createComponent<
52 TOrthogonal, ClNav2Z>(actionServerName_);
53
54 // Create nav2-specific interface component (requires actionClient)
56
57 // The nav2 bond heartbeat subscription CbWaitNav2Nodes listens to, for the life of the state machine
59
60 RCLCPP_INFO_STREAM(
61 this->getLogger(), "[ClNav2Z] Components created for action server: " << actionServerName_);
62 }
rclcpp::Logger getLogger()
SmaccComponentType * createComponent(const TArgs &... targs)
namespace cl_nav2z class ClNav2Z

References actionServerName_, smacc2::ISmaccClient::createComponent(), and smacc2::ISmaccClient::getLogger().

Here is the call graph for this function:

Member Data Documentation

◆ actionServerName_

std::string cl_nav2z::ClNav2Z::actionServerName_
private

Definition at line 65 of file cl_nav2z.hpp.

Referenced by onComponentInitialization().


The documentation for this class was generated from the following file: