Skip to main content

GetWaypointNames Class

Retrieves the names of all waypoints whose name starts with a given prefix, sorted lexicographically. More...

Declaration

class moveit_pro::behaviors::GetWaypointNames { ... }

Included Headers

#include <get_waypoint_names.hpp>

Base class

classSharedResourcesNode<BehaviorTreeNodeT>

The SharedResourcesNode class provides a BehaviorContext object when constructing a BehaviorTree.Cpp node. More...

Private Member Typedefs Index

usingGetWaypoints = moveit_studio_agent_msgs::srv::GetWaypoints
usingGetWaypointsClient = rclcpp::Client< GetWaypoints >

Public Constructors Index

GetWaypointNames (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)

Public Member Functions Index

BT::NodeStatusonStart () override
BT::NodeStatusonRunning () override
voidonHalted () override

Private Member Functions Index

tl::expected< std::vector< BT::Any >, std::string >getWaypointNames (std::string_view prefix, GetWaypoints::Response::SharedPtr response) const

Private Member Attributes Index

GetWaypointsClient::SharedPtrget_waypoints_client_
std::optional< GetWaypointsClient::FutureAndRequestId >request_future_
std::stringprefix_
std::chrono::steady_clock::time_pointend_time_

Public Static Functions Index

static BT::PortsListprovidedPorts ()
static BT::KeyValueVectormetadata ()

Description

Retrieves the names of all waypoints whose name starts with a given prefix, sorted lexicographically.

Sends a service request to the Agent WaypointManager and filters the returned waypoint names by prefix. An empty prefix matches every waypoint. Fails when no waypoint matches, so a misspelled prefix cannot silently produce an empty list.

Data Port NamePort TypeObject Type
prefixInputstd::string
waypoint_namesOutputstd::vector<BT::Any>

Definition at line 38 of file get_waypoint_names.hpp.

Private Member Typedefs

GetWaypoints

using moveit_pro::behaviors::GetWaypointNames::GetWaypoints = moveit_studio_agent_msgs::srv::GetWaypoints

Definition at line 55 of file get_waypoint_names.hpp.

GetWaypointsClient

using moveit_pro::behaviors::GetWaypointNames::GetWaypointsClient = rclcpp::Client<GetWaypoints>

Definition at line 56 of file get_waypoint_names.hpp.

Public Constructors

GetWaypointNames()

moveit_pro::behaviors::GetWaypointNames::GetWaypointNames (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources)

Declaration at line 41 of file get_waypoint_names.hpp, definition at line 44 of file get_waypoint_names.cpp.

Public Member Functions

onHalted()

void moveit_pro::behaviors::GetWaypointNames::onHalted ()

Declaration at line 52 of file get_waypoint_names.hpp, definition at line 131 of file get_waypoint_names.cpp.

onRunning()

BT::NodeStatus moveit_pro::behaviors::GetWaypointNames::onRunning ()

Declaration at line 50 of file get_waypoint_names.hpp, definition at line 97 of file get_waypoint_names.cpp.

onStart()

BT::NodeStatus moveit_pro::behaviors::GetWaypointNames::onStart ()

Declaration at line 48 of file get_waypoint_names.hpp, definition at line 68 of file get_waypoint_names.cpp.

Private Member Functions

getWaypointNames()

tl::expected< std::vector< BT::Any >, std::string > moveit_pro::behaviors::GetWaypointNames::getWaypointNames (std::string_view prefix, GetWaypoints::Response::SharedPtr response)

Declaration at line 60 of file get_waypoint_names.hpp, definition at line 140 of file get_waypoint_names.cpp.

Private Member Attributes

end_time_

std::chrono::steady_clock::time_point moveit_pro::behaviors::GetWaypointNames::end_time_

Definition at line 72 of file get_waypoint_names.hpp.

get_waypoints_client_

GetWaypointsClient::SharedPtr moveit_pro::behaviors::GetWaypointNames::get_waypoints_client_

Definition at line 63 of file get_waypoint_names.hpp.

prefix_

std::string moveit_pro::behaviors::GetWaypointNames::prefix_

Definition at line 69 of file get_waypoint_names.hpp.

request_future_

std::optional<GetWaypointsClient::FutureAndRequestId> moveit_pro::behaviors::GetWaypointNames::request_future_

Definition at line 66 of file get_waypoint_names.hpp.

Public Static Functions

metadata()

BT::KeyValueVector moveit_pro::behaviors::GetWaypointNames::metadata ()
static

Declaration at line 46 of file get_waypoint_names.hpp, definition at line 63 of file get_waypoint_names.cpp.

providedPorts()

BT::PortsList moveit_pro::behaviors::GetWaypointNames::providedPorts ()
static

Declaration at line 44 of file get_waypoint_names.hpp, definition at line 52 of file get_waypoint_names.cpp.


The documentation for this class was generated from the following files:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.