SMACC2
|
#include <waypoints_navigator.hpp>
Public Member Functions | |
WaypointNavigator () | |
void | onInitialize () override |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
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) |
void | sendNextGoal () |
void | stopWaitingResult () |
const std::vector< geometry_msgs::msg::Pose > & | getWaypoints () const |
long | getCurrentWaypointIndex () const |
void | rewind (int count) |
Public Member Functions inherited from smacc2::ISmaccComponent | |
ISmaccComponent () | |
virtual | ~ISmaccComponent () |
virtual std::string | getName () const |
Public Attributes | |
WaypointEventDispatcher | waypointsEventDispatcher |
ClNav2Z * | client_ |
long | currentWaypoint_ |
smacc2::SmaccSignal< void()> | onNavigationRequestSucceded |
smacc2::SmaccSignal< void()> | onNavigationRequestAborted |
smacc2::SmaccSignal< void()> | onNavigationRequestCancelled |
Private Member Functions | |
void | insertWaypoint (int index, geometry_msgs::msg::Pose &newpose) |
void | removeWaypoint (int index) |
void | onGoalReached (ClNav2Z::WrappedResult &res) |
void | onGoalCancelled (ClNav2Z::WrappedResult &) |
void | onGoalAborted (ClNav2Z::WrappedResult &) |
Private Attributes | |
std::vector< geometry_msgs::msg::Pose > | waypoints_ |
std::vector< std::string > | waypointsNames_ |
boost::signals2::connection | succeddedNav2ZClientConnection_ |
boost::signals2::connection | abortedNav2ZClientConnection_ |
boost::signals2::connection | cancelledNav2ZClientConnection_ |
Additional Inherited Members | |
Protected Member Functions inherited from smacc2::ISmaccComponent | |
virtual void | onInitialize () |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
template<typename TComponent > | |
void | requiresComponent (TComponent *&requiredComponentStorage) |
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 () |
ISmaccStateMachine * | getStateMachine () |
Protected Attributes inherited from smacc2::ISmaccComponent | |
ISmaccStateMachine * | stateMachine_ |
ISmaccClient * | owner_ |
Definition at line 49 of file waypoints_navigator.hpp.
cl_nav2z::WaypointNavigator::WaypointNavigator | ( | ) |
Definition at line 37 of file waypoints_navigator.cpp.
long cl_nav2z::WaypointNavigator::getCurrentWaypointIndex | ( | ) | const |
Definition at line 189 of file waypoints_navigator.cpp.
References currentWaypoint_.
Referenced by cl_nav2z::CbNavigateNextWaypoint::onEntry().
const std::vector< geometry_msgs::msg::Pose > & cl_nav2z::WaypointNavigator::getWaypoints | ( | ) | const |
Definition at line 184 of file waypoints_navigator.cpp.
References waypoints_.
|
private |
Definition at line 143 of file waypoints_navigator.cpp.
References waypoints_.
void cl_nav2z::WaypointNavigator::loadWayPointsFromFile | ( | std::string | filepath | ) |
Definition at line 192 of file waypoints_navigator.cpp.
References smacc2::ISmaccComponent::getLogger(), generate_debs::parser, and waypoints_.
Referenced by sm_dance_bot::OrNavigation::loadWaypointsFromYaml(), sm_dance_bot_strikes_back::OrNavigation::loadWaypointsFromYaml(), and sm_husky_barrel_search_1::OrNavigation::loadWaypointsFromYaml().
void cl_nav2z::WaypointNavigator::loadWayPointsFromFile2 | ( | std::string | filepath | ) |
Definition at line 258 of file waypoints_navigator.cpp.
References smacc2::ISmaccComponent::getLogger(), generate_debs::parser, waypoints_, and waypointsNames_.
Referenced by sm_aws_warehouse_navigation::OrNavigation::loadWaypointsFromYaml().
|
private |
Definition at line 48 of file waypoints_navigator.cpp.
References onNavigationRequestAborted, and stopWaitingResult().
Referenced by sendNextGoal().
|
private |
Definition at line 41 of file waypoints_navigator.cpp.
References onNavigationRequestCancelled, and stopWaitingResult().
Referenced by sendNextGoal().
|
private |
Definition at line 55 of file waypoints_navigator.cpp.
References currentWaypoint_, smacc2::ISmaccComponent::getLogger(), onNavigationRequestSucceded, cl_nav2z::WaypointEventDispatcher::postWaypointEvent(), stopWaitingResult(), and waypointsEventDispatcher.
Referenced by sendNextGoal().
|
overridevirtual |
Reimplemented from smacc2::ISmaccComponent.
Definition at line 39 of file waypoints_navigator.cpp.
References client_, and smacc2::ISmaccComponent::owner_.
|
inline |
Definition at line 61 of file waypoints_navigator.hpp.
References client_, cl_nav2z::WaypointEventDispatcher::initialize(), and waypointsEventDispatcher.
|
private |
Definition at line 176 of file waypoints_navigator.cpp.
References waypoints_.
void cl_nav2z::WaypointNavigator::rewind | ( | int | count | ) |
Definition at line 67 of file waypoints_navigator.cpp.
References currentWaypoint_.
void cl_nav2z::WaypointNavigator::sendNextGoal | ( | ) |
Definition at line 83 of file waypoints_navigator.cpp.
References abortedNav2ZClientConnection_, cancelledNav2ZClientConnection_, client_, currentWaypoint_, smacc2::ISmaccClient::getComponent(), smacc2::ISmaccStateMachine::getCurrentState(), smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getName(), smacc2::ISmaccState::getName(), smacc2::ISmaccComponent::getNode(), smacc2::ISmaccClient::getStateMachine(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onAborted(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onCancelled(), onGoalAborted(), onGoalCancelled(), onGoalReached(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onSucceeded(), smacc2::ISmaccComponent::owner_, cl_nav2z::odom_tracker::RECORD_PATH, smacc2::client_bases::SmaccActionClientBase< ActionType >::sendGoal(), cl_nav2z::PlannerSwitcher::setDefaultPlanners(), cl_nav2z::GoalCheckerSwitcher::setGoalCheckerId(), succeddedNav2ZClientConnection_, cl_nav2z::Pose::toPoseMsg(), and waypoints_.
Referenced by cl_nav2z::CbNavigateNextWaypoint::onEntry().
void cl_nav2z::WaypointNavigator::setWaypoints | ( | const std::vector< geometry_msgs::msg::Pose > & | waypoints | ) |
Definition at line 151 of file waypoints_navigator.cpp.
References waypoints_.
void cl_nav2z::WaypointNavigator::setWaypoints | ( | const std::vector< Pose2D > & | waypoints | ) |
Definition at line 156 of file waypoints_navigator.cpp.
References waypoints_, and waypointsNames_.
void cl_nav2z::WaypointNavigator::stopWaitingResult | ( | ) |
Definition at line 73 of file waypoints_navigator.cpp.
References abortedNav2ZClientConnection_, cancelledNav2ZClientConnection_, and succeddedNav2ZClientConnection_.
Referenced by cl_nav2z::CbNavigateNextWaypoint::onExit(), onGoalAborted(), onGoalCancelled(), and onGoalReached().
|
private |
Definition at line 103 of file waypoints_navigator.hpp.
Referenced by sendNextGoal(), and stopWaitingResult().
|
private |
Definition at line 104 of file waypoints_navigator.hpp.
Referenced by sendNextGoal(), and stopWaitingResult().
ClNav2Z* cl_nav2z::WaypointNavigator::client_ |
Definition at line 54 of file waypoints_navigator.hpp.
Referenced by onInitialize(), onOrthogonalAllocation(), and sendNextGoal().
long cl_nav2z::WaypointNavigator::currentWaypoint_ |
Definition at line 81 of file waypoints_navigator.hpp.
Referenced by getCurrentWaypointIndex(), onGoalReached(), rewind(), and sendNextGoal().
smacc2::SmaccSignal<void()> cl_nav2z::WaypointNavigator::onNavigationRequestAborted |
Definition at line 86 of file waypoints_navigator.hpp.
Referenced by onGoalAborted().
smacc2::SmaccSignal<void()> cl_nav2z::WaypointNavigator::onNavigationRequestCancelled |
Definition at line 87 of file waypoints_navigator.hpp.
Referenced by onGoalCancelled().
smacc2::SmaccSignal<void()> cl_nav2z::WaypointNavigator::onNavigationRequestSucceded |
Definition at line 85 of file waypoints_navigator.hpp.
Referenced by onGoalReached().
|
private |
Definition at line 102 of file waypoints_navigator.hpp.
Referenced by sendNextGoal(), and stopWaitingResult().
|
private |
Definition at line 98 of file waypoints_navigator.hpp.
Referenced by getWaypoints(), insertWaypoint(), loadWayPointsFromFile(), loadWayPointsFromFile2(), removeWaypoint(), sendNextGoal(), and setWaypoints().
WaypointEventDispatcher cl_nav2z::WaypointNavigator::waypointsEventDispatcher |
Definition at line 52 of file waypoints_navigator.hpp.
Referenced by onGoalReached(), and onOrthogonalAllocation().
|
private |
Definition at line 100 of file waypoints_navigator.hpp.
Referenced by loadWayPointsFromFile2(), and setWaypoints().