|
SMACC2
|
#include <cp_waypoints_navigator.hpp>


Public Member Functions | |
| CpWaypointNavigator () | |
| void | onInitialize () override |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| std::optional< std::shared_future< std::shared_ptr< rclcpp_action::ClientGoalHandle< nav2_msgs::action::NavigateToPose > > > > | sendNextGoal (std::optional< NavigateNextWaypointOptions > options=std::nullopt) |
| void | stopWaitingResult () |
| CpWaypointNavigator () | |
| void | onInitialize () override |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| std::optional< std::shared_future< std::shared_ptr< rclcpp_action::ClientGoalHandle< nav2_msgs::action::NavigateToPose > > > > | sendNextGoal (std::optional< NavigateNextWaypointOptions > options=std::nullopt, cl_nav2z::ClNav2Z::SmaccNavigateResultSignal::WeakPtr callback=cl_nav2z::ClNav2Z::SmaccNavigateResultSignal::WeakPtr()) |
| void | stopWaitingResult () |
Public Member Functions inherited from cl_nav2z::CpWaypointNavigatorBase | |
| CpWaypointNavigatorBase () | |
| virtual | ~CpWaypointNavigatorBase () |
| void | onInitialize () override |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| void | loadWayPointsFromFile (std::string filepath) |
| void | loadWayPointsFromFile2 (std::string filepath) |
| void | setWaypoints (const std::vector< geometry_msgs::msg::Pose > &waypoints) |
| void | setWaypoints (const std::vector< Pose2D > &waypoints) |
| const std::vector< geometry_msgs::msg::Pose > & | getWaypoints () const |
| const std::vector< std::string > & | getWaypointNames () const |
| std::optional< geometry_msgs::msg::Pose > | getNamedPose (std::string name) const |
| geometry_msgs::msg::Pose | getPose (int index) const |
| geometry_msgs::msg::Pose | getCurrentPose () const |
| long | getCurrentWaypointIndex () const |
| std::optional< std::string > | getCurrentWaypointName () const |
| void | rewind (int count) |
| void | forward (int count) |
| void | seekName (std::string name) |
| void | loadWaypointsFromYamlParameter (std::string parameter_name, std::string yaml_file_package_name) |
| void | notifyGoalReached () |
| CpWaypointNavigatorBase () | |
| virtual | ~CpWaypointNavigatorBase () |
| void | onInitialize () override |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onOrthogonalAllocation () |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| void | loadWayPointsFromFile (std::string filepath) |
| void | loadWayPointsFromFile2 (std::string filepath) |
| void | setWaypoints (const std::vector< geometry_msgs::msg::Pose > &waypoints) |
| void | setWaypoints (const std::vector< Pose2D > &waypoints) |
| const std::vector< geometry_msgs::msg::Pose > & | getWaypoints () const |
| const std::vector< std::string > & | getWaypointNames () const |
| std::optional< geometry_msgs::msg::Pose > | getNamedPose (std::string name) const |
| geometry_msgs::msg::Pose | getPose (int index) const |
| geometry_msgs::msg::Pose | getCurrentPose () const |
| long | getCurrentWaypointIndex () const |
| std::optional< std::string > | getCurrentWaypointName () const |
| void | rewind (int count) |
| void | forward (int count) |
| void | seekName (std::string name) |
| void | loadWaypointsFromYamlParameter (std::string parameter_name, std::string yaml_file_package_name) |
| void | notifyGoalReached () |
Public Member Functions inherited from smacc2::ISmaccComponent | |
| ISmaccComponent () | |
| virtual | ~ISmaccComponent () |
| virtual std::string | getName () const |
Public Attributes | |
| ClNav2Z * | client_ |
| components::CpNav2ActionInterface * | nav2ActionInterface_ = nullptr |
| smacc2::SmaccSignal< void()> | onNavigationRequestSucceded |
| smacc2::SmaccSignal< void()> | onNavigationRequestAborted |
| smacc2::SmaccSignal< void()> | onNavigationRequestCancelled |
Public Attributes inherited from cl_nav2z::CpWaypointNavigatorBase | |
| WaypointEventDispatcher | waypointsEventDispatcher |
| long | currentWaypoint_ |
Private Member Functions | |
| void | onNavigationResult (const components::CpNav2ActionInterface::WrappedResult &r) |
| void | onGoalReached (const components::CpNav2ActionInterface::WrappedResult &res) |
| void | onGoalCancelled (const components::CpNav2ActionInterface::WrappedResult &) |
| void | onGoalAborted (const components::CpNav2ActionInterface::WrappedResult &) |
| void | onNavigationResult (const ClNav2Z::WrappedResult &r) |
| void | onGoalReached (const ClNav2Z::WrappedResult &res) |
| void | onGoalCancelled (const ClNav2Z::WrappedResult &) |
| void | onGoalAborted (const ClNav2Z::WrappedResult &) |
Private Attributes | |
| boost::signals2::connection | succeddedNav2ZClientConnection_ |
| boost::signals2::connection | abortedNav2ZClientConnection_ |
| boost::signals2::connection | cancelledNav2ZClientConnection_ |
Additional Inherited Members | |
Protected Member Functions inherited from cl_nav2z::CpWaypointNavigatorBase | |
| void | insertWaypoint (int index, geometry_msgs::msg::Pose &newpose) |
| void | removeWaypoint (int index) |
| void | insertWaypoint (int index, geometry_msgs::msg::Pose &newpose) |
| void | removeWaypoint (int index) |
Protected Member Functions inherited from smacc2::ISmaccComponent | |
| 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) |
| template<typename TComponent > | |
| void | requiresComponent (std::string name, TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist) |
| template<typename TComponent > | |
| void | requiresComponent (TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| template<typename TComponent > | |
| void | requiresComponent (std::string name, TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| 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 () |
Protected Attributes inherited from cl_nav2z::CpWaypointNavigatorBase | |
| std::vector< geometry_msgs::msg::Pose > | waypoints_ |
| std::vector< std::string > | waypointsNames_ |
Protected Attributes inherited from smacc2::ISmaccComponent | |
| ISmaccStateMachine * | stateMachine_ |
| ISmaccClient * | owner_ |
Definition at line 46 of file cp_waypoints_navigator.hpp.
| cl_nav2z::CpWaypointNavigator::CpWaypointNavigator | ( | ) |
Definition at line 44 of file cp_waypoints_navigator.cpp.
| cl_nav2z::CpWaypointNavigator::CpWaypointNavigator | ( | ) |
|
private |
Definition at line 55 of file cp_waypoints_navigator.cpp.
|
private |
Definition at line 61 of file cp_waypoints_navigator.cpp.
References onNavigationRequestAborted, and stopWaitingResult().
Referenced by onNavigationResult(), and sendNextGoal().


|
private |
Definition at line 48 of file cp_waypoints_navigator.cpp.
|
private |
Definition at line 53 of file cp_waypoints_navigator.cpp.
References onNavigationRequestCancelled, and stopWaitingResult().
Referenced by onNavigationResult(), and sendNextGoal().


|
private |
Definition at line 62 of file cp_waypoints_navigator.cpp.
|
private |
Definition at line 69 of file cp_waypoints_navigator.cpp.
References cl_nav2z::CpWaypointNavigatorBase::currentWaypoint_, smacc2::ISmaccComponent::getLogger(), cl_nav2z::CpWaypointNavigatorBase::notifyGoalReached(), onNavigationRequestSucceded, WaypointEventDispatcher::postWaypointEvent(), stopWaitingResult(), and cl_nav2z::CpWaypointNavigatorBase::waypointsEventDispatcher.
Referenced by onNavigationResult(), and sendNextGoal().


|
overridevirtual |
Reimplemented from smacc2::ISmaccComponent.
Definition at line 48 of file cp_waypoints_navigator.cpp.
References nav2ActionInterface_, and smacc2::ISmaccComponent::requiresComponent().

|
overridevirtual |
Reimplemented from smacc2::ISmaccComponent.
|
private |
Definition at line 308 of file cp_waypoints_navigator.cpp.
|
private |
Definition at line 329 of file cp_waypoints_navigator.cpp.
References onGoalAborted(), onGoalCancelled(), and onGoalReached().

|
inline |
Definition at line 59 of file cp_waypoints_navigator.hpp.
References client_, WaypointEventDispatcher::initialize(), smacc2::ISmaccComponent::owner_, smacc2::ISmaccComponent::requiresComponent(), and cl_nav2z::CpWaypointNavigatorBase::waypointsEventDispatcher.

|
inline |
Definition at line 56 of file cp_waypoints_navigator.hpp.
References client_, WaypointEventDispatcher::initialize(), and cl_nav2z::CpWaypointNavigatorBase::waypointsEventDispatcher.

| std::optional< std::shared_future< std::shared_ptr< rclcpp_action::ClientGoalHandle< nav2_msgs::action::NavigateToPose > > > > cl_nav2z::CpWaypointNavigator::sendNextGoal | ( | std::optional< NavigateNextWaypointOptions > | options = std::nullopt | ) |
Definition at line 200 of file cp_waypoints_navigator.cpp.
References abortedNav2ZClientConnection_, cancelledNav2ZClientConnection_, cl_nav2z::CpPlannerSwitcher::commitPublish(), cl_nav2z::CpWaypointNavigatorBase::currentWaypoint_, smacc2::ISmaccStateMachine::getCurrentState(), smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getName(), smacc2::ISmaccState::getName(), cl_nav2z::CpPose::getReferenceFrame(), smacc2::ISmaccClient::getStateMachine(), nav2ActionInterface_, onGoalAborted(), onGoalCancelled(), onGoalReached(), cl_nav2z::components::CpNav2ActionInterface::onNavigationAborted(), cl_nav2z::components::CpNav2ActionInterface::onNavigationCancelled(), cl_nav2z::components::CpNav2ActionInterface::onNavigationSucceeded(), smacc2::ISmaccComponent::owner_, cl_nav2z::odom_tracker::CpOdomTracker::pushPath(), cl_nav2z::odom_tracker::RECORD_PATH, smacc2::ISmaccComponent::requiresComponent(), cl_nav2z::components::CpNav2ActionInterface::sendGoal(), cl_nav2z::CpPlannerSwitcher::setDefaultPlanners(), cl_nav2z::CpPlannerSwitcher::setDesiredController(), cl_nav2z::CpGoalCheckerSwitcher::setGoalCheckerId(), cl_nav2z::odom_tracker::CpOdomTracker::setStartPoint(), cl_nav2z::odom_tracker::CpOdomTracker::setWorkingMode(), succeddedNav2ZClientConnection_, cl_nav2z::CpPose::toPoseMsg(), cl_nav2z::CpWaypointNavigatorBase::waypoints_, and cl_nav2z::CpWaypointNavigatorBase::waypointsNames_.
Referenced by cl_nav2z::CbNavigateNextWaypoint::onEntry().


| std::optional< std::shared_future< std::shared_ptr< rclcpp_action::ClientGoalHandle< nav2_msgs::action::NavigateToPose > > > > cl_nav2z::CpWaypointNavigator::sendNextGoal | ( | std::optional< NavigateNextWaypointOptions > | options = std::nullopt, |
| cl_nav2z::ClNav2Z::SmaccNavigateResultSignal::WeakPtr | callback = cl_nav2z::ClNav2Z::SmaccNavigateResultSignal::WeakPtr() ) |
Definition at line 192 of file cp_waypoints_navigator.cpp.
References cl_nav2z::odom_tracker::RECORD_PATH, cl_nav2z::CpPlannerSwitcher::setDefaultPlanners(), and cl_nav2z::Pose::toPoseMsg().

| void cl_nav2z::CpWaypointNavigator::stopWaitingResult | ( | ) |
Definition at line 188 of file cp_waypoints_navigator.cpp.
References abortedNav2ZClientConnection_, cancelledNav2ZClientConnection_, and succeddedNav2ZClientConnection_.
Referenced by cl_nav2z::CbNavigateNextWaypoint::onExit(), onGoalAborted(), onGoalCancelled(), and onGoalReached().

| void cl_nav2z::CpWaypointNavigator::stopWaitingResult | ( | ) |
|
private |
Definition at line 84 of file cp_waypoints_navigator.hpp.
Referenced by sendNextGoal(), and stopWaitingResult().
|
private |
Definition at line 85 of file cp_waypoints_navigator.hpp.
Referenced by sendNextGoal(), and stopWaitingResult().
| ClNav2Z * cl_nav2z::CpWaypointNavigator::client_ |
Definition at line 51 of file cp_waypoints_navigator.hpp.
Referenced by onStateOrthogonalAllocation().
| components::CpNav2ActionInterface* cl_nav2z::CpWaypointNavigator::nav2ActionInterface_ = nullptr |
Definition at line 52 of file cp_waypoints_navigator.hpp.
Referenced by onInitialize(), and sendNextGoal().
| smacc2::SmaccSignal< void()> cl_nav2z::CpWaypointNavigator::onNavigationRequestAborted |
Definition at line 73 of file cp_waypoints_navigator.hpp.
Referenced by onGoalAborted().
| smacc2::SmaccSignal< void()> cl_nav2z::CpWaypointNavigator::onNavigationRequestCancelled |
Definition at line 74 of file cp_waypoints_navigator.hpp.
Referenced by onGoalCancelled().
| smacc2::SmaccSignal< void()> cl_nav2z::CpWaypointNavigator::onNavigationRequestSucceded |
Definition at line 72 of file cp_waypoints_navigator.hpp.
Referenced by onGoalReached().
|
private |
Definition at line 83 of file cp_waypoints_navigator.hpp.
Referenced by sendNextGoal(), and stopWaitingResult().