SMACC2
|
#include <cp_waypoints_navigator_base.hpp>
Public Member Functions | |
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 | |
WaypointEventDispatcher | waypointsEventDispatcher |
long | currentWaypoint_ |
Protected Attributes | |
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 47 of file cp_waypoints_navigator_base.hpp.
cl_nitrosz::CpWaypointNavigatorBase::CpWaypointNavigatorBase | ( | ) |
Definition at line 38 of file cp_waypoints_navigator.cpp.
|
virtual |
Definition at line 40 of file cp_waypoints_navigator.cpp.
void cl_nitrosz::CpWaypointNavigatorBase::forward | ( | int | count | ) |
Definition at line 82 of file cp_waypoints_navigator.cpp.
References currentWaypoint_, and waypoints_.
Referenced by cl_nitrosz::CbSeekWaypoint::onEntry(), and cl_nitrosz::CbNavigateNextWaypointFree::onSucessCallback().
geometry_msgs::msg::Pose cl_nitrosz::CpWaypointNavigatorBase::getCurrentPose | ( | ) | const |
Definition at line 385 of file cp_waypoints_navigator.cpp.
References currentWaypoint_, and waypoints_.
Referenced by cl_nitrosz::CbNavigateNextWaypointFree::onEntry().
long cl_nitrosz::CpWaypointNavigatorBase::getCurrentWaypointIndex | ( | ) | const |
Definition at line 428 of file cp_waypoints_navigator.cpp.
References currentWaypoint_.
Referenced by cl_nitrosz::CbNavigateNextWaypoint::onEntry(), cl_nitrosz::CbNavigateNextWaypointUntilReached::onNavigationActionSuccess(), cl_nitrosz::CbNavigateNextWaypointFree::onSucessCallback(), and cl_nitrosz::CpWaypointsVisualizer::update().
std::optional< std::string > cl_nitrosz::CpWaypointNavigatorBase::getCurrentWaypointName | ( | ) | const |
Definition at line 419 of file cp_waypoints_navigator.cpp.
References currentWaypoint_, and waypointsNames_.
Referenced by cl_nitrosz::CbNavigateNextWaypoint::onEntry(), and cl_nitrosz::CbNavigateNextWaypointUntilReached::onNavigationActionSuccess().
std::optional< geometry_msgs::msg::Pose > cl_nitrosz::CpWaypointNavigatorBase::getNamedPose | ( | std::string | name | ) | const |
Definition at line 397 of file cp_waypoints_navigator.cpp.
References waypoints_, and waypointsNames_.
geometry_msgs::msg::Pose cl_nitrosz::CpWaypointNavigatorBase::getPose | ( | int | index | ) | const |
Definition at line 374 of file cp_waypoints_navigator.cpp.
References waypoints_.
const std::vector< std::string > & cl_nitrosz::CpWaypointNavigatorBase::getWaypointNames | ( | ) | const |
Definition at line 414 of file cp_waypoints_navigator.cpp.
References waypointsNames_.
Referenced by cl_nitrosz::CpWaypointsVisualizer::onInitialize().
const std::vector< geometry_msgs::msg::Pose > & cl_nitrosz::CpWaypointNavigatorBase::getWaypoints | ( | ) | const |
Definition at line 369 of file cp_waypoints_navigator.cpp.
References waypoints_.
Referenced by cl_nitrosz::CpWaypointsVisualizer::onInitialize().
|
protected |
Definition at line 328 of file cp_waypoints_navigator.cpp.
References waypoints_.
void cl_nitrosz::CpWaypointNavigatorBase::loadWayPointsFromFile | ( | std::string | filepath | ) |
Definition at line 431 of file cp_waypoints_navigator.cpp.
References smacc2::ISmaccComponent::getLogger(), waypoints_, and waypointsNames_.
Referenced by loadWaypointsFromYamlParameter(), and cl_nitrosz::CbLoadWaypointsFile::onEntry().
void cl_nitrosz::CpWaypointNavigatorBase::loadWayPointsFromFile2 | ( | std::string | filepath | ) |
Definition at line 504 of file cp_waypoints_navigator.cpp.
References smacc2::ISmaccComponent::getLogger(), waypoints_, and waypointsNames_.
void cl_nitrosz::CpWaypointNavigatorBase::loadWaypointsFromYamlParameter | ( | std::string | parameter_name, |
std::string | yaml_file_package_name | ||
) |
Definition at line 152 of file cp_waypoints_navigator.cpp.
References smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), and loadWayPointsFromFile().
Referenced by cl_nitrosz::CbLoadWaypointsFile::onEntry().
void cl_nitrosz::CpWaypointNavigatorBase::notifyGoalReached | ( | ) |
Definition at line 298 of file cp_waypoints_navigator.cpp.
References currentWaypoint_, smacc2::ISmaccComponent::getLogger(), and waypoints_.
Referenced by cl_nitrosz::CpWaypointNavigator::onGoalReached(), and cl_nitrosz::CbNavigateNextWaypointFree::onSucessCallback().
|
overridevirtual |
Reimplemented from smacc2::ISmaccComponent.
Definition at line 44 of file cp_waypoints_navigator.cpp.
|
protected |
Definition at line 361 of file cp_waypoints_navigator.cpp.
References waypoints_.
void cl_nitrosz::CpWaypointNavigatorBase::rewind | ( | int | count | ) |
Definition at line 76 of file cp_waypoints_navigator.cpp.
References currentWaypoint_.
void cl_nitrosz::CpWaypointNavigatorBase::seekName | ( | std::string | name | ) |
Definition at line 89 of file cp_waypoints_navigator.cpp.
References currentWaypoint_, smacc2::ISmaccComponent::getLogger(), waypoints_, and waypointsNames_.
Referenced by cl_nitrosz::CbNavigateNamedWaypoint::onEntry(), and cl_nitrosz::CbSeekWaypoint::onEntry().
void cl_nitrosz::CpWaypointNavigatorBase::setWaypoints | ( | const std::vector< geometry_msgs::msg::Pose > & | waypoints | ) |
Definition at line 336 of file cp_waypoints_navigator.cpp.
References waypoints_.
void cl_nitrosz::CpWaypointNavigatorBase::setWaypoints | ( | const std::vector< Pose2D > & | waypoints | ) |
Definition at line 341 of file cp_waypoints_navigator.cpp.
References waypoints_, and waypointsNames_.
long cl_nitrosz::CpWaypointNavigatorBase::currentWaypoint_ |
Definition at line 81 of file cp_waypoints_navigator_base.hpp.
Referenced by forward(), getCurrentPose(), getCurrentWaypointIndex(), getCurrentWaypointName(), notifyGoalReached(), cl_nitrosz::CbLoadWaypointsFile::onEntry(), cl_nitrosz::CpWaypointNavigator::onGoalReached(), rewind(), seekName(), and cl_nitrosz::CpWaypointNavigator::sendNextGoal().
|
protected |
Definition at line 98 of file cp_waypoints_navigator_base.hpp.
Referenced by forward(), getCurrentPose(), getNamedPose(), getPose(), getWaypoints(), insertWaypoint(), loadWayPointsFromFile(), loadWayPointsFromFile2(), notifyGoalReached(), removeWaypoint(), seekName(), cl_nitrosz::CpWaypointNavigator::sendNextGoal(), setWaypoints(), and setWaypoints().
WaypointEventDispatcher cl_nitrosz::CpWaypointNavigatorBase::waypointsEventDispatcher |
Definition at line 50 of file cp_waypoints_navigator_base.hpp.
Referenced by cl_nitrosz::CpWaypointNavigator::onGoalReached(), and cl_nitrosz::CpWaypointNavigator::onOrthogonalAllocation().
|
protected |
Definition at line 100 of file cp_waypoints_navigator_base.hpp.
Referenced by getCurrentWaypointName(), getNamedPose(), getWaypointNames(), loadWayPointsFromFile(), loadWayPointsFromFile2(), seekName(), cl_nitrosz::CpWaypointNavigator::sendNextGoal(), and setWaypoints().