SMACC2
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
cl_nav2z::CbNavigateNextWaypointFree Class Reference

#include <cb_navigate_next_waypoint_free.hpp>

Inheritance diagram for cl_nav2z::CbNavigateNextWaypointFree:
Inheritance graph
Collaboration diagram for cl_nav2z::CbNavigateNextWaypointFree:
Collaboration graph

Public Member Functions

 CbNavigateNextWaypointFree ()
 
virtual ~CbNavigateNextWaypointFree ()
 
void onEntry () override
 
void onSucessCallback ()
 
void onExit () override
 
- Public Member Functions inherited from cl_nav2z::CbPositionControlFreeSpace
 CbPositionControlFreeSpace ()
 
void updateParameters ()
 
void onEntry () override
 
void onExit () override
 
- Public Member Functions inherited from smacc2::SmaccAsyncClientBehavior
template<typename TOrthogonal , typename TSourceObject >
void onOrthogonalAllocation ()
 
virtual ~SmaccAsyncClientBehavior ()
 
template<typename TCallback , typename T >
boost::signals2::connection onSuccess (TCallback callback, T *object)
 
template<typename TCallback , typename T >
boost::signals2::connection onFinished (TCallback callback, T *object)
 
template<typename TCallback , typename T >
boost::signals2::connection onFailure (TCallback callback, T *object)
 
void requestForceFinish ()
 
void executeOnEntry () override
 
void executeOnExit () override
 
void waitOnEntryThread (bool requestFinish)
 
template<typename TCallbackMethod , typename T >
boost::signals2::connection onSuccess (TCallbackMethod callback, T *object)
 
template<typename TCallbackMethod , typename T >
boost::signals2::connection onFinished (TCallbackMethod callback, T *object)
 
template<typename TCallbackMethod , typename T >
boost::signals2::connection onFailure (TCallbackMethod callback, T *object)
 
- Public Member Functions inherited from smacc2::ISmaccClientBehavior
 ISmaccClientBehavior ()
 
virtual ~ISmaccClientBehavior ()
 
ISmaccStateMachinegetStateMachine ()
 
std::string getName () const
 
template<typename SmaccClientType >
void requiresClient (SmaccClientType *&storage)
 
template<typename SmaccComponentType >
void requiresComponent (SmaccComponentType *&storage, bool throwExceptionIfNotExist=false)
 

Protected Attributes

cl_nav2z::CpWaypointNavigatorBasewaypointsNavigator_
 

Additional Inherited Members

- Public Attributes inherited from cl_nav2z::CbPositionControlFreeSpace
double yaw_goal_tolerance_rads_ = 0.1
 
double threshold_distance_ = 3.0
 
geometry_msgs::msg::Pose target_pose_
 
- Protected Member Functions inherited from smacc2::SmaccAsyncClientBehavior
void postSuccessEvent ()
 
void postFailureEvent ()
 
virtual void dispose () override
 
bool isShutdownRequested ()
 onEntry is executed in a new thread. However the current state cannot be left until the onEntry thread finishes. This flag can be checked from the onEntry thread to force finishing the thread.
 
- Protected Member Functions inherited from smacc2::ISmaccClientBehavior
virtual void runtimeConfigure ()
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 
ISmaccStategetCurrentState ()
 
virtual rclcpp::Node::SharedPtr getNode () const
 
virtual rclcpp::Logger getLogger () const
 

Detailed Description

Definition at line 27 of file cb_navigate_next_waypoint_free.hpp.

Constructor & Destructor Documentation

◆ CbNavigateNextWaypointFree()

cl_nav2z::CbNavigateNextWaypointFree::CbNavigateNextWaypointFree ( )

Definition at line 25 of file cb_navigate_next_waypoint_free.cpp.

25{}

◆ ~CbNavigateNextWaypointFree()

cl_nav2z::CbNavigateNextWaypointFree::~CbNavigateNextWaypointFree ( )
virtual

Definition at line 27 of file cb_navigate_next_waypoint_free.cpp.

27{}

Member Function Documentation

◆ onEntry()

void cl_nav2z::CbNavigateNextWaypointFree::onEntry ( )
overridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 29 of file cb_navigate_next_waypoint_free.cpp.

30{
33
34 this->onSuccess(&CbNavigateNextWaypointFree::CbNavigateNextWaypointFree::onSucessCallback, this);
35 RCLCPP_INFO_STREAM(
36 getLogger(), "[CbNavigateNextWaypoint] initial load file target pose: x: "
37 << this->target_pose_.position.x << ", y: " << this->target_pose_.position.y);
39}
cl_nav2z::CpWaypointNavigatorBase * waypointsNavigator_
geometry_msgs::msg::Pose getCurrentPose() const
virtual rclcpp::Logger getLogger() const
void requiresComponent(SmaccComponentType *&storage, bool throwExceptionIfNotExist=false)
boost::signals2::connection onSuccess(TCallback callback, T *object)

References cl_nav2z::CpWaypointNavigatorBase::getCurrentPose(), smacc2::ISmaccClientBehavior::getLogger(), cl_nav2z::CbPositionControlFreeSpace::onEntry(), smacc2::SmaccAsyncClientBehavior::onSuccess(), smacc2::ISmaccClientBehavior::requiresComponent(), cl_nav2z::CbPositionControlFreeSpace::target_pose_, and waypointsNavigator_.

Here is the call graph for this function:

◆ onExit()

void cl_nav2z::CbNavigateNextWaypointFree::onExit ( )
overridevirtual

Reimplemented from smacc2::ISmaccClientBehavior.

Definition at line 52 of file cb_navigate_next_waypoint_free.cpp.

52{}

◆ onSucessCallback()

void cl_nav2z::CbNavigateNextWaypointFree::onSucessCallback ( )

Definition at line 41 of file cb_navigate_next_waypoint_free.cpp.

42{
43 RCLCPP_INFO_STREAM(getLogger(), "[CbNavigateNextWaypoint] Success on planning to next waypoint");
46 RCLCPP_INFO_STREAM(
47 getLogger(), "[CbNavigateNextWaypoint] next position index: "
49 << this->waypointsNavigator_->getWaypoints().size());
50}

References cl_nav2z::CpWaypointNavigatorBase::forward(), cl_nav2z::CpWaypointNavigatorBase::getCurrentWaypointIndex(), smacc2::ISmaccClientBehavior::getLogger(), cl_nav2z::CpWaypointNavigatorBase::notifyGoalReached(), and waypointsNavigator_.

Here is the call graph for this function:

Member Data Documentation

◆ waypointsNavigator_

cl_nav2z::CpWaypointNavigatorBase* cl_nav2z::CbNavigateNextWaypointFree::waypointsNavigator_
protected

Definition at line 41 of file cb_navigate_next_waypoint_free.hpp.

Referenced by onEntry(), and onSucessCallback().


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