MoveIt Pro API
Core Behaviors for MoveIt Pro
Loading...
Searching...
No Matches
moveit_pro::behaviors::DetachOrRemoveURDF Class Reference

Base class for behaviors that detach URDF objects from a robot or remove them from the planning scene. More...

#include <detach_or_remove_urdf.hpp>

Inheritance diagram for moveit_pro::behaviors::DetachOrRemoveURDF:
Collaboration diagram for moveit_pro::behaviors::DetachOrRemoveURDF:

Public Types

using DetachOrRemoveURDFSrv = moveit_studio_agent_msgs::srv::DetachOrRemoveURDF
 

Public Member Functions

 DetachOrRemoveURDF (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 
 DetachOrRemoveURDF (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< ClientInterfaceBase< DetachOrRemoveURDFSrv > > client_interface)
 
virtual std::string getUrdfNamePort () const
 
void setServiceName (std::string service_name)
 Set the service name this Behavior targets. Derived classes call this from their constructor.
 
- Public Member Functions inherited from moveit_pro::behaviors::ServiceClientBehaviorBase< moveit_studio_agent_msgs::srv::DetachOrRemoveURDF >
 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< moveit_studio_agent_msgs::srv::DetachOrRemoveURDF > > client_interface)
 Constructs ServiceClientBehaviorBase using a user-provided implementation of ClientInterfaceBase.
 
 ~ServiceClientBehaviorBase () override=default
 
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.
 
- 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.
 
void notifyCanHalt ()
 Called when runAsync() finishes to notify onHalted() that the async process has finished.
 
- 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 > &behavior_context)
 Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node.
 
const std::shared_ptr< BehaviorContext > & getBehaviorContext () const
 

Static Public Member Functions

static BT::PortsList providedPorts ()
 

Static Public Attributes

static constexpr auto kDefaultUrdfNamePort = "urdf_name"
 
static constexpr auto kDetachURDFBehaviorName = "DetachURDF"
 
static constexpr auto kRemoveURDFFromSceneBehaviorName = "RemoveURDFFromScene"
 
static constexpr auto kDetachURDFServiceName = "detach_urdf"
 
static constexpr auto kRemoveURDFFromSceneServiceName = "remove_urdf_from_scene"
 
- Static Public Attributes inherited from moveit_pro::behaviors::ServiceClientBehaviorBase< moveit_studio_agent_msgs::srv::DetachOrRemoveURDF >
static constexpr std::chrono::seconds kTimeoutWaitForServiceServer
 

Detailed Description

Base class for behaviors that detach URDF objects from a robot or remove them from the planning scene.

This is a base class used by DetachURDF and RemoveURDFFromScene behaviors. Derived classes call setServiceName() in their constructors to select the appropriate service.

Data Port Name Port Type Object Type
urdf_name input std::string

Member Typedef Documentation

◆ DetachOrRemoveURDFSrv

using moveit_pro::behaviors::DetachOrRemoveURDF::DetachOrRemoveURDFSrv = moveit_studio_agent_msgs::srv::DetachOrRemoveURDF

Constructor & Destructor Documentation

◆ DetachOrRemoveURDF() [1/2]

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

◆ DetachOrRemoveURDF() [2/2]

moveit_pro::behaviors::DetachOrRemoveURDF::DetachOrRemoveURDF ( const std::string &  name,
const BT::NodeConfiguration &  config,
const std::shared_ptr< BehaviorContext > &  shared_resources,
std::unique_ptr< ClientInterfaceBase< DetachOrRemoveURDFSrv > >  client_interface 
)
explicit

Member Function Documentation

◆ getUrdfNamePort()

virtual std::string moveit_pro::behaviors::DetachOrRemoveURDF::getUrdfNamePort ( ) const
inlinevirtual

◆ providedPorts()

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

◆ setServiceName()

void moveit_pro::behaviors::DetachOrRemoveURDF::setServiceName ( std::string  service_name)
inline

Set the service name this Behavior targets. Derived classes call this from their constructor.

Member Data Documentation

◆ kDefaultUrdfNamePort

constexpr auto moveit_pro::behaviors::DetachOrRemoveURDF::kDefaultUrdfNamePort = "urdf_name"
staticconstexpr

◆ kDetachURDFBehaviorName

constexpr auto moveit_pro::behaviors::DetachOrRemoveURDF::kDetachURDFBehaviorName = "DetachURDF"
staticconstexpr

◆ kDetachURDFServiceName

constexpr auto moveit_pro::behaviors::DetachOrRemoveURDF::kDetachURDFServiceName = "detach_urdf"
staticconstexpr

◆ kRemoveURDFFromSceneBehaviorName

constexpr auto moveit_pro::behaviors::DetachOrRemoveURDF::kRemoveURDFFromSceneBehaviorName = "RemoveURDFFromScene"
staticconstexpr

◆ kRemoveURDFFromSceneServiceName

constexpr auto moveit_pro::behaviors::DetachOrRemoveURDF::kRemoveURDFFromSceneServiceName = "remove_urdf_from_scene"
staticconstexpr

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