MoveIt Pro API
Core Behaviors for MoveIt Pro
Loading...
Searching...
No Matches
moveit_pro::behaviors::EditWaypoint Class Referencefinal

Use the /edit_waypoints service to save the robot's current state as a new named waypoint or erase an existing waypoint. The name of the waypoint to save or delete is set through the "waypoint_name" behavior parameter. The operation to perform on the waypoint is set through the "waypoint_operation" behavior parameter, which must be set to either "save" or "erase". If set to "save", then the "joint_group_names" parameter must also be set to specify which joint groups to include in the saved waypoint. More...

#include <edit_waypoint.hpp>

Inheritance diagram for moveit_pro::behaviors::EditWaypoint:
Collaboration diagram for moveit_pro::behaviors::EditWaypoint:

Public Member Functions

 EditWaypoint (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::chrono::duration< double > timeout=std::chrono::seconds(3))
 
 EditWaypoint (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< moveit_pro::behaviors::BehaviorContext > &shared_resources, std::unique_ptr< ClientInterfaceBase< EditWaypoints > > client_interface, std::chrono::duration< double > timeout=std::chrono::seconds(3))
 Constructor for EditWaypoint behavior that allows for mocking of the rclcpp service client.
 
- Public Member Functions inherited from moveit_pro::behaviors::ServiceClientBehaviorBase< EditWaypoints >
 ServiceClientBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 Constructs ServiceClientBehaviorBase using the RclcppClientInterface.
 
 ServiceClientBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< ClientInterfaceBase< EditWaypoints > > client_interface)
 Constructs ServiceClientBehaviorBase using a user-provided implementation of ClientInterfaceBase.
 
 ~ServiceClientBehaviorBase () override=default
 
- Public Member Functions inherited from moveit_pro::behaviors::AsyncBehaviorBase
 AsyncBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 
 ~AsyncBehaviorBase () override=default
 
BT::NodeStatus onStart () override
 Required implementation of BT::StatefulActionNode::onStart().
 
BT::NodeStatus onRunning () override
 Required implementation of BT::StatefulActionNode::onRunning().
 
void onHalted () override
 Required implementation of BT::StatefulActionNode::onHalted().
 
void resetStatus ()
 Resets the internal status of this node.
 
- Public Member Functions inherited from moveit_pro::behaviors::SharedResourcesNode< BT::StatefulActionNode >
 SharedResourcesNode (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node.
 

Static Public Member Functions

static BT::PortsList providedPorts ()
 
static BT::KeyValueVector metadata ()
 

Additional Inherited Members

- Static Public Attributes inherited from moveit_pro::behaviors::ServiceClientBehaviorBase< EditWaypoints >
static constexpr std::chrono::seconds kTimeoutWaitForServiceServer
 
- Protected Member Functions inherited from moveit_pro::behaviors::ServiceClientBehaviorBase< EditWaypoints >
virtual tl::expected< std::chrono::duration< double >, std::string > getWaitForServerAvailableTimeout ()
 Optional user-provided function to set the timeout used when waiting for the service server to be available.
 
virtual tl::expected< bool, std::string > processResponse (const typename ServiceT::Response &)
 Optional user-provided function to process the service response after the service has finished.
 
tl::expected< void, std::string > doHalt () override
 Handles halting logic which is specific to the service client behavior implementation.
 
- Protected Member Functions inherited from moveit_pro::behaviors::AsyncBehaviorBase
void notifyCanHalt ()
 Called when runAsync() finishes to notify onHalted() that the async process has finished.
 
- Protected Attributes inherited from moveit_pro::behaviors::SharedResourcesNode< BT::StatefulActionNode >
std::shared_ptr< BehaviorContextshared_resources_
 

Detailed Description

Use the /edit_waypoints service to save the robot's current state as a new named waypoint or erase an existing waypoint. The name of the waypoint to save or delete is set through the "waypoint_name" behavior parameter. The operation to perform on the waypoint is set through the "waypoint_operation" behavior parameter, which must be set to either "save" or "erase". If set to "save", then the "joint_group_names" parameter must also be set to specify which joint groups to include in the saved waypoint.

Data Port Name Port Type Object Type
waypoint_name input std::string
waypoint_operation input std::string
joint_group_names input std::vector<std::string>

Constructor & Destructor Documentation

◆ EditWaypoint() [1/2]

moveit_pro::behaviors::EditWaypoint::EditWaypoint ( const std::string &  name,
const BT::NodeConfiguration &  config,
const std::shared_ptr< BehaviorContext > &  shared_resources,
std::chrono::duration< double timeout = std::chrono::seconds(3) 
)

◆ EditWaypoint() [2/2]

moveit_pro::behaviors::EditWaypoint::EditWaypoint ( const std::string &  name,
const BT::NodeConfiguration &  config,
const std::shared_ptr< moveit_pro::behaviors::BehaviorContext > &  shared_resources,
std::unique_ptr< ClientInterfaceBase< EditWaypoints > >  client_interface,
std::chrono::duration< double timeout = std::chrono::seconds(3) 
)

Constructor for EditWaypoint behavior that allows for mocking of the rclcpp service client.

Member Function Documentation

◆ metadata()

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

◆ providedPorts()

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

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