|
SMACC2
|
#include <cp_waypoints_navigator_base.hpp>


Public Member Functions | |
| CpWaypointNavigatorBase () | |
| ~CpWaypointNavigatorBase () override | |
| void | onInitialize () override |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| bool | loadWayPointsFromFile (std::string filepath) |
| bool | 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) |
| bool | seekName (std::string name) |
| bool | loadWaypointsFromYamlParameter (std::string parameter_name, std::string yaml_file_package_name) |
| void | notifyGoalReached () |
Public Member Functions inherited from smacc2::ISmaccComponent | |
| ISmaccComponent () | |
| virtual | ~ISmaccComponent () |
| ISmaccComponent (const ISmaccComponent &)=delete | |
| ISmaccComponent & | operator= (const ISmaccComponent &)=delete |
| ISmaccComponent (ISmaccComponent &&)=delete | |
| ISmaccComponent & | operator= (ISmaccComponent &&)=delete |
| virtual std::string | getName () const |
Public Attributes | |
| WaypointEventDispatcher | waypointsEventDispatcher |
| long | currentWaypoint_ |
Protected Member Functions | |
| 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 | onStateOrthogonalAllocation () |
| template<typename TComponent > | |
| void | requiresComponent (TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| template<typename TComponent > | |
| void | requiresComponent (const 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 (const TArgs &... targs) |
| template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
| SmaccComponentType * | createSiblingNamedComponent (const std::string &name, const TArgs &... targs) |
| rclcpp::Node::SharedPtr | getNode () |
| rclcpp::Logger | getLogger () const |
| ISmaccStateMachine * | getStateMachine () |
Protected Attributes | |
| std::vector< geometry_msgs::msg::Pose > | waypoints_ |
| std::vector< std::string > | waypointsNames_ |
Protected Attributes inherited from smacc2::ISmaccComponent | |
| ISmaccStateMachine * | stateMachine_ = nullptr |
| ISmaccClient * | owner_ = nullptr |
Private Member Functions | |
| void | addWaypoint (const geometry_msgs::msg::Pose &pose, const std::string &name) |
| void | clearWaypoints () |
Definition at line 47 of file cp_waypoints_navigator_base.hpp.
| cl_nav2z::CpWaypointNavigatorBase::CpWaypointNavigatorBase | ( | ) |
Definition at line 41 of file cp_waypoints_navigator.cpp.
|
override |
Definition at line 43 of file cp_waypoints_navigator.cpp.
|
private |
Definition at line 323 of file cp_waypoints_navigator.cpp.
References waypoints_, and waypointsNames_.
Referenced by loadWayPointsFromFile(), loadWayPointsFromFile2(), setWaypoints(), and setWaypoints().

|
private |
Definition at line 330 of file cp_waypoints_navigator.cpp.
References waypoints_, and waypointsNames_.
Referenced by loadWayPointsFromFile(), loadWayPointsFromFile2(), setWaypoints(), and setWaypoints().

| void cl_nav2z::CpWaypointNavigatorBase::forward | ( | int | count | ) |
Definition at line 91 of file cp_waypoints_navigator.cpp.
References currentWaypoint_, and waypoints_.
Referenced by cl_nav2z::CbSeekWaypoint::onEntry(), and cl_nav2z::CbNavigateNextWaypointFree::onSucessCallback().

| geometry_msgs::msg::Pose cl_nav2z::CpWaypointNavigatorBase::getCurrentPose | ( | ) | const |
Definition at line 388 of file cp_waypoints_navigator.cpp.
References currentWaypoint_, and waypoints_.
Referenced by cl_nav2z::CbNavigateNextWaypointFree::onEntry().

| long cl_nav2z::CpWaypointNavigatorBase::getCurrentWaypointIndex | ( | ) | const |
Definition at line 434 of file cp_waypoints_navigator.cpp.
References currentWaypoint_.
Referenced by cl_nav2z::CbNavigateNextWaypoint::onEntry(), cl_nav2z::CbNavigateNextWaypointFree::onSucessCallback(), and cl_nav2z::CpWaypointsVisualizer::update().

| std::optional< std::string > cl_nav2z::CpWaypointNavigatorBase::getCurrentWaypointName | ( | ) | const |
Definition at line 423 of file cp_waypoints_navigator.cpp.
References currentWaypoint_, and waypointsNames_.
Referenced by cl_nav2z::CbNavigateNextWaypoint::onEntry(), and cl_nav2z::CbNavigateNextWaypointUntilReached::onEntry().

| std::optional< geometry_msgs::msg::Pose > cl_nav2z::CpWaypointNavigatorBase::getNamedPose | ( | std::string | name | ) | const |
Definition at line 400 of file cp_waypoints_navigator.cpp.
References waypoints_, and waypointsNames_.
| geometry_msgs::msg::Pose cl_nav2z::CpWaypointNavigatorBase::getPose | ( | int | index | ) | const |
Definition at line 377 of file cp_waypoints_navigator.cpp.
References waypoints_.
| const std::vector< std::string > & cl_nav2z::CpWaypointNavigatorBase::getWaypointNames | ( | ) | const |
Definition at line 418 of file cp_waypoints_navigator.cpp.
References waypointsNames_.
Referenced by cl_nav2z::CpWaypointsVisualizer::onInitialize().

| const std::vector< geometry_msgs::msg::Pose > & cl_nav2z::CpWaypointNavigatorBase::getWaypoints | ( | ) | const |
Definition at line 372 of file cp_waypoints_navigator.cpp.
References waypoints_.
Referenced by cl_nav2z::CpWaypointsVisualizer::onInitialize().

|
protected |
Definition at line 314 of file cp_waypoints_navigator.cpp.
References waypoints_, and waypointsNames_.
| bool cl_nav2z::CpWaypointNavigatorBase::loadWayPointsFromFile | ( | std::string | filepath | ) |
Definition at line 437 of file cp_waypoints_navigator.cpp.
References addWaypoint(), clearWaypoints(), smacc2::ISmaccComponent::getLogger(), and waypoints_.
Referenced by loadWaypointsFromYamlParameter(), and cl_nav2z::CbLoadWaypointsFile::onEntry().


| bool cl_nav2z::CpWaypointNavigatorBase::loadWayPointsFromFile2 | ( | std::string | filepath | ) |
Definition at line 505 of file cp_waypoints_navigator.cpp.
References addWaypoint(), clearWaypoints(), smacc2::ISmaccComponent::getLogger(), and waypoints_.

| bool cl_nav2z::CpWaypointNavigatorBase::loadWaypointsFromYamlParameter | ( | std::string | parameter_name, |
| std::string | yaml_file_package_name ) |
Definition at line 135 of file cp_waypoints_navigator.cpp.
References smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), and loadWayPointsFromFile().
Referenced by cl_nav2z::CbLoadWaypointsFile::onEntry().


| void cl_nav2z::CpWaypointNavigatorBase::notifyGoalReached | ( | ) |
Definition at line 286 of file cp_waypoints_navigator.cpp.
References currentWaypoint_, smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::postEvent(), and waypoints_.
Referenced by cl_nav2z::CpWaypointNavigator::onGoalReached(), and cl_nav2z::CbNavigateNextWaypointFree::onSucessCallback().


|
overridevirtual |
Reimplemented from smacc2::ISmaccComponent.
Definition at line 47 of file cp_waypoints_navigator.cpp.
|
inline |
Definition at line 59 of file cp_waypoints_navigator_base.hpp.
References WaypointEventDispatcher::initialize(), smacc2::ISmaccComponent::owner_, and waypointsEventDispatcher.

|
protected |
Definition at line 363 of file cp_waypoints_navigator.cpp.
References waypoints_, and waypointsNames_.
| void cl_nav2z::CpWaypointNavigatorBase::rewind | ( | int | count | ) |
Definition at line 85 of file cp_waypoints_navigator.cpp.
References currentWaypoint_.
Referenced by cl_nav2z::CbSeekWaypoint::onEntry().

| bool cl_nav2z::CpWaypointNavigatorBase::seekName | ( | std::string | name | ) |
Definition at line 99 of file cp_waypoints_navigator.cpp.
References currentWaypoint_, smacc2::ISmaccComponent::getLogger(), waypoints_, and waypointsNames_.
Referenced by cl_nav2z::CbNavigateNamedWaypoint::onEntry(), and cl_nav2z::CbSeekWaypoint::onEntry().


| void cl_nav2z::CpWaypointNavigatorBase::setWaypoints | ( | const std::vector< geometry_msgs::msg::Pose > & | waypoints | ) |
Definition at line 336 of file cp_waypoints_navigator.cpp.
References addWaypoint(), and clearWaypoints().

| void cl_nav2z::CpWaypointNavigatorBase::setWaypoints | ( | const std::vector< Pose2D > & | waypoints | ) |
Definition at line 345 of file cp_waypoints_navigator.cpp.
References addWaypoint(), and clearWaypoints().

| long cl_nav2z::CpWaypointNavigatorBase::currentWaypoint_ |
Definition at line 83 of file cp_waypoints_navigator_base.hpp.
Referenced by forward(), getCurrentPose(), getCurrentWaypointIndex(), getCurrentWaypointName(), notifyGoalReached(), cl_nav2z::CbLoadWaypointsFile::onEntry(), cl_nav2z::CpWaypointNavigator::onGoalReached(), rewind(), seekName(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().
|
protected |
Definition at line 103 of file cp_waypoints_navigator_base.hpp.
Referenced by addWaypoint(), clearWaypoints(), forward(), getCurrentPose(), getNamedPose(), getPose(), getWaypoints(), insertWaypoint(), loadWayPointsFromFile(), loadWayPointsFromFile2(), notifyGoalReached(), removeWaypoint(), seekName(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().
| WaypointEventDispatcher cl_nav2z::CpWaypointNavigatorBase::waypointsEventDispatcher |
Definition at line 50 of file cp_waypoints_navigator_base.hpp.
Referenced by cl_nav2z::CpWaypointNavigator::onGoalReached(), cl_nav2z::CpWaypointNavigator::onStateOrthogonalAllocation(), and onStateOrthogonalAllocation().
|
protected |
Definition at line 105 of file cp_waypoints_navigator_base.hpp.
Referenced by addWaypoint(), clearWaypoints(), getCurrentWaypointName(), getNamedPose(), getWaypointNames(), insertWaypoint(), removeWaypoint(), seekName(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().