SMACC2
|
#include <cp_waypoints_navigator.hpp>
Public Member Functions | |
CpWaypointNavigator () | |
void | onInitialize () override |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
std::optional< std::shared_future< std::shared_ptr< rclcpp_action::ClientGoalHandle< nav2_msgs::action::NavigateToPose > > > > | sendNextGoal (std::optional< NavigateNextWaypointOptions > options=std::nullopt, cl_nitrosz::ClNitrosZ::SmaccNavigateResultSignal::WeakPtr callback=cl_nitrosz::ClNitrosZ::SmaccNavigateResultSignal::WeakPtr()) |
void | stopWaitingResult () |
Public Member Functions inherited from cl_nitrosz::CpWaypointNavigatorBase | |
CpWaypointNavigatorBase () | |
virtual | ~CpWaypointNavigatorBase () |
void | onInitialize () override |
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 | |
ClNitrosZ * | client_ |
smacc2::SmaccSignal< void()> | onNavigationRequestSucceded |
smacc2::SmaccSignal< void()> | onNavigationRequestAborted |
smacc2::SmaccSignal< void()> | onNavigationRequestCancelled |
Public Attributes inherited from cl_nitrosz::CpWaypointNavigatorBase | |
WaypointEventDispatcher | waypointsEventDispatcher |
long | currentWaypoint_ |
Private Member Functions | |
void | onNavigationResult (const ClNitrosZ::WrappedResult &r) |
void | onGoalReached (const ClNitrosZ::WrappedResult &res) |
void | onGoalCancelled (const ClNitrosZ::WrappedResult &) |
void | onGoalAborted (const ClNitrosZ::WrappedResult &) |
Private Attributes | |
boost::signals2::connection | succeddedNav2ZClientConnection_ |
boost::signals2::connection | abortedNav2ZClientConnection_ |
boost::signals2::connection | cancelledNav2ZClientConnection_ |
Definition at line 46 of file cp_waypoints_navigator.hpp.
cl_nitrosz::CpWaypointNavigator::CpWaypointNavigator | ( | ) |
Definition at line 42 of file cp_waypoints_navigator.cpp.
|
private |
Definition at line 55 of file cp_waypoints_navigator.cpp.
References onNavigationRequestAborted, and stopWaitingResult().
Referenced by onNavigationResult().
|
private |
Definition at line 48 of file cp_waypoints_navigator.cpp.
References onNavigationRequestCancelled, and stopWaitingResult().
Referenced by onNavigationResult().
|
private |
Definition at line 62 of file cp_waypoints_navigator.cpp.
References cl_nitrosz::CpWaypointNavigatorBase::currentWaypoint_, smacc2::ISmaccComponent::getLogger(), cl_nitrosz::CpWaypointNavigatorBase::notifyGoalReached(), onNavigationRequestSucceded, WaypointEventDispatcher::postWaypointEvent(), stopWaitingResult(), and cl_nitrosz::CpWaypointNavigatorBase::waypointsEventDispatcher.
Referenced by onNavigationResult().
|
overridevirtual |
Reimplemented from smacc2::ISmaccComponent.
Definition at line 46 of file cp_waypoints_navigator.cpp.
References client_, and smacc2::ISmaccComponent::owner_.
|
private |
Definition at line 308 of file cp_waypoints_navigator.cpp.
References onGoalAborted(), onGoalCancelled(), and onGoalReached().
Referenced by sendNextGoal().
|
inline |
Definition at line 56 of file cp_waypoints_navigator.hpp.
References client_, WaypointEventDispatcher::initialize(), and cl_nitrosz::CpWaypointNavigatorBase::waypointsEventDispatcher.
std::optional< std::shared_future< std::shared_ptr< rclcpp_action::ClientGoalHandle< nav2_msgs::action::NavigateToPose > > > > cl_nitrosz::CpWaypointNavigator::sendNextGoal | ( | std::optional< NavigateNextWaypointOptions > | options = std::nullopt , |
cl_nitrosz::ClNitrosZ::SmaccNavigateResultSignal::WeakPtr | callback = cl_nitrosz::ClNitrosZ::SmaccNavigateResultSignal::WeakPtr() |
||
) |
Definition at line 192 of file cp_waypoints_navigator.cpp.
References client_, smacc2::ISmaccStateMachine::createSignalConnection(), cl_nitrosz::CpWaypointNavigatorBase::currentWaypoint_, smacc2::ISmaccClient::getComponent(), smacc2::ISmaccStateMachine::getCurrentState(), smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getName(), smacc2::ISmaccState::getName(), smacc2::ISmaccComponent::getStateMachine(), smacc2::ISmaccClient::getStateMachine(), onNavigationResult(), smacc2::ISmaccComponent::owner_, cl_nitrosz::odom_tracker::RECORD_PATH, smacc2::client_bases::SmaccActionClientBase< ActionType >::sendGoal(), cl_nitrosz::CpPlannerSwitcher::setDefaultPlanners(), succeddedNav2ZClientConnection_, cl_nitrosz::Pose::toPoseMsg(), cl_nitrosz::CpWaypointNavigatorBase::waypoints_, and cl_nitrosz::CpWaypointNavigatorBase::waypointsNames_.
Referenced by cl_nitrosz::CbNavigateNextWaypoint::onEntry().
void cl_nitrosz::CpWaypointNavigator::stopWaitingResult | ( | ) |
Definition at line 180 of file cp_waypoints_navigator.cpp.
References abortedNav2ZClientConnection_, cancelledNav2ZClientConnection_, and succeddedNav2ZClientConnection_.
Referenced by cl_nitrosz::CbNavigateNextWaypoint::onExit(), onGoalAborted(), onGoalCancelled(), and onGoalReached().
|
private |
Definition at line 82 of file cp_waypoints_navigator.hpp.
Referenced by stopWaitingResult().
|
private |
Definition at line 83 of file cp_waypoints_navigator.hpp.
Referenced by stopWaitingResult().
ClNitrosZ* cl_nitrosz::CpWaypointNavigator::client_ |
Definition at line 49 of file cp_waypoints_navigator.hpp.
Referenced by onInitialize(), onOrthogonalAllocation(), and sendNextGoal().
smacc2::SmaccSignal<void()> cl_nitrosz::CpWaypointNavigator::onNavigationRequestAborted |
Definition at line 71 of file cp_waypoints_navigator.hpp.
Referenced by onGoalAborted().
smacc2::SmaccSignal<void()> cl_nitrosz::CpWaypointNavigator::onNavigationRequestCancelled |
Definition at line 72 of file cp_waypoints_navigator.hpp.
Referenced by onGoalCancelled().
smacc2::SmaccSignal<void()> cl_nitrosz::CpWaypointNavigator::onNavigationRequestSucceded |
Definition at line 70 of file cp_waypoints_navigator.hpp.
Referenced by onGoalReached().
|
private |
Definition at line 81 of file cp_waypoints_navigator.hpp.
Referenced by sendNextGoal(), and stopWaitingResult().