Base class for behaviors that detach URDF objects from a robot or remove them from the planning scene. More...
Declaration
class moveit_pro::behaviors::DetachOrRemoveURDF { ... }
#include <detach_or_remove_urdf.hpp>
Base class
Derived Classes
Public Member Typedefs Index
Public Constructors Index
| 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) |
|
|
|
Public Member Functions Index
| void | setServiceName (std::string service_name) |
|
Set the service name this Behavior targets. Derived classes call this from their constructor. More...
|
|
Private Member Functions Index
| tl::expected< std::string, std::string > | getServiceName () override |
|
User-provided function to get the name of the service when initializing the service client. More...
|
|
| tl::expected< std::chrono::duration< double >, std::string > | getResponseTimeout () override |
|
Optional user-provided function to set the timeout used when waiting for the service response. More...
|
|
| tl::expected< DetachOrRemoveURDFSrv::Request, std::string > | createRequest () override |
|
User-provided function to create the service request. More...
|
|
| tl::expected< bool, std::string > | processResponse (const DetachOrRemoveURDFSrv::Response &response) override |
|
|
|
| std::shared_future< tl::expected< bool, std::string > > & | getFuture () override |
|
Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member. More...
|
|
Private Member Attributes Index
Public Static Functions Index
Public Static Attributes Index
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 |
Definition at line 25 of file detach_or_remove_urdf.hpp.
Public Member Typedefs
DetachOrRemoveURDFSrv
| using moveit_pro::behaviors::DetachOrRemoveURDF::DetachOrRemoveURDFSrv = moveit_studio_agent_msgs::srv::DetachOrRemoveURDF |
|
Public Constructors
DetachOrRemoveURDF()
| moveit_pro::behaviors::DetachOrRemoveURDF::DetachOrRemoveURDF (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources) |
|
explicit
|
DetachOrRemoveURDF()
Public Member Functions
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.
Definition at line 48 of file detach_or_remove_urdf.hpp.
Private Member Functions
createRequest()
| tl::expected< DetachOrRemoveURDFSrv::Request, std::string > moveit_pro::behaviors::DetachOrRemoveURDF::createRequest () |
|
virtual
|
User-provided function to create the service request.
- Returns
Returns a service request message. If not successful, returns an error message. Note that the criteria for success or failure is defined by the user's implementation of this function.
Declaration at line 58 of file detach_or_remove_urdf.hpp, definition at line 53 of file detach_or_remove_urdf.cpp.
getFuture()
| std::shared_future< tl::expected< bool, std::string > > & moveit_pro::behaviors::DetachOrRemoveURDF::getFuture () |
|
inline
virtual
|
getResponseTimeout()
| tl::expected< std::chrono::duration< double >, std::string > moveit_pro::behaviors::DetachOrRemoveURDF::getResponseTimeout () |
|
virtual
|
Optional user-provided function to set the timeout used when waiting for the service response.
If no user-defined implementation is provided, the default implementation returns a negative duration, which will cause the service client to wait for the response without timing out.
- Returns
Returns the service response timeout duration. If not successful, returns an error message. Note that the criteria for success or failure is defined by the user's implementation of this function.
Declaration at line 56 of file detach_or_remove_urdf.hpp, definition at line 48 of file detach_or_remove_urdf.cpp.
getServiceName()
| tl::expected< std::string, std::string > moveit_pro::behaviors::DetachOrRemoveURDF::getServiceName () |
|
virtual
|
User-provided function to get the name of the service when initializing the service client.
- Returns
Returns the name of the service. If not successful, returns an error message. Note that the criteria for success or failure is defined by the user's implementation of this function.
Declaration at line 54 of file detach_or_remove_urdf.hpp, definition at line 43 of file detach_or_remove_urdf.cpp.
processResponse()
| tl::expected< bool, std::string > moveit_pro::behaviors::DetachOrRemoveURDF::processResponse (const DetachOrRemoveURDFSrv::Response & response) |
|
Private Member Attributes
future_
| std::shared_future<tl::expected<bool, std::string> > moveit_pro::behaviors::DetachOrRemoveURDF::future_ |
|
service_name_
| std::string moveit_pro::behaviors::DetachOrRemoveURDF::service_name_ |
|
Public Static Functions
providedPorts()
| BT::PortsList moveit_pro::behaviors::DetachOrRemoveURDF::providedPorts () |
|
static
|
Public Static Attributes
kDefaultUrdfNamePort
| constexpr auto moveit_pro::behaviors::DetachOrRemoveURDF::kDefaultUrdfNamePort = "urdf_name" |
|
constexpr
static
|
kDetachURDFBehaviorName
| constexpr auto moveit_pro::behaviors::DetachOrRemoveURDF::kDetachURDFBehaviorName = "DetachURDF" |
|
constexpr
static
|
kDetachURDFServiceName
| constexpr auto moveit_pro::behaviors::DetachOrRemoveURDF::kDetachURDFServiceName = "detach_urdf" |
|
constexpr
static
|
kRemoveURDFFromSceneBehaviorName
| constexpr auto moveit_pro::behaviors::DetachOrRemoveURDF::kRemoveURDFFromSceneBehaviorName = "RemoveURDFFromScene" |
|
constexpr
static
|
kRemoveURDFFromSceneServiceName
| constexpr auto moveit_pro::behaviors::DetachOrRemoveURDF::kRemoveURDFFromSceneServiceName = "remove_urdf_from_scene" |
|
constexpr
static
|
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.