MoveIt Pro API
Core Behaviors for MoveIt Pro
Loading...
Searching...
No Matches
moveit_studio::behaviors::AddURDF Class Reference

This Behavior sends a request to add a URDF object to the planning scene as a collision object. More...

#include <add_urdf.hpp>

Inheritance diagram for moveit_studio::behaviors::AddURDF:
Collaboration diagram for moveit_studio::behaviors::AddURDF:

Public Types

using AddURDFSrv = moveit_studio_agent_msgs::srv::AddURDF
 

Public Member Functions

 AddURDF (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 
 AddURDF (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< ClientInterfaceBase< AddURDFSrv > > client_interface)
 
- Public Member Functions inherited from moveit_studio::behaviors::ServiceClientBehaviorBase< moveit_studio_agent_msgs::srv::AddURDF >
 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::AddURDF > > client_interface)
 Constructs ServiceClientBehaviorBase using a user-provided implementation of ClientInterfaceBase.
 
virtual ~ServiceClientBehaviorBase ()=default
 
- Public Member Functions inherited from moveit_studio::behaviors::AsyncBehaviorBase
 AsyncBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 
virtual ~AsyncBehaviorBase ()=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_studio::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 ()
 

Static Public Attributes

static constexpr auto kDefaultUrdfNamePort = "urdf_name"
 
static constexpr auto kDefaultPackageNamePort = "package_name"
 
static constexpr auto kDefaultUrdfFilePathPort = "urdf_file_path"
 
static constexpr auto kDefaultUrdfPosePort = "urdf_pose"
 
- Static Public Attributes inherited from moveit_studio::behaviors::ServiceClientBehaviorBase< moveit_studio_agent_msgs::srv::AddURDF >
static constexpr std::chrono::seconds kTimeoutWaitForServiceServer
 

Protected Member Functions

virtual std::string getUrdfNamePort () const
 
virtual std::string getPackageNamePort () const
 
virtual std::string getUrdfFilePathPort () const
 
virtual std::string getUrdfPosePort () const
 
- Protected Member Functions inherited from moveit_studio::behaviors::ServiceClientBehaviorBase< moveit_studio_agent_msgs::srv::AddURDF >
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.
 
- Protected Member Functions inherited from moveit_studio::behaviors::AsyncBehaviorBase
void notifyCanHalt ()
 Called when runAsync() finishes to notify onHalted() that the async process has finished.
 

Additional Inherited Members

- Protected Attributes inherited from moveit_studio::behaviors::SharedResourcesNode< BT::StatefulActionNode >
std::shared_ptr< BehaviorContextshared_resources_
 

Detailed Description

This Behavior sends a request to add a URDF object to the planning scene as a collision object.

The object is added to the planning scene at the specified pose. The object is given as a URDF file, which describes the kinematics and collision geometry. If the URDF contains joints and those are reported in the /joint_states topic, the object collision shapes will update their state accordingly.

See also AttachURDF for attaching a URDF object to the robot.

Data Port Name Port Type Object Type
urdf_name input std::string
package_name input std::string
urdf_file_path input std::string
urdf_pose input geometry_msgs::msg::PoseStamped

Member Typedef Documentation

◆ AddURDFSrv

using moveit_studio::behaviors::AddURDF::AddURDFSrv = moveit_studio_agent_msgs::srv::AddURDF

Constructor & Destructor Documentation

◆ AddURDF() [1/2]

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

◆ AddURDF() [2/2]

moveit_studio::behaviors::AddURDF::AddURDF ( const std::string &  name,
const BT::NodeConfiguration &  config,
const std::shared_ptr< BehaviorContext > &  shared_resources,
std::unique_ptr< ClientInterfaceBase< AddURDFSrv > >  client_interface 
)
explicit

Member Function Documentation

◆ getPackageNamePort()

virtual std::string moveit_studio::behaviors::AddURDF::getPackageNamePort ( ) const
inlineprotectedvirtual

◆ getUrdfFilePathPort()

virtual std::string moveit_studio::behaviors::AddURDF::getUrdfFilePathPort ( ) const
inlineprotectedvirtual

◆ getUrdfNamePort()

virtual std::string moveit_studio::behaviors::AddURDF::getUrdfNamePort ( ) const
inlineprotectedvirtual

◆ getUrdfPosePort()

virtual std::string moveit_studio::behaviors::AddURDF::getUrdfPosePort ( ) const
inlineprotectedvirtual

◆ metadata()

BT::KeyValueVector moveit_studio::behaviors::AddURDF::metadata ( )
static

◆ providedPorts()

BT::PortsList moveit_studio::behaviors::AddURDF::providedPorts ( )
static

Member Data Documentation

◆ kDefaultPackageNamePort

constexpr auto moveit_studio::behaviors::AddURDF::kDefaultPackageNamePort = "package_name"
staticconstexpr

◆ kDefaultUrdfFilePathPort

constexpr auto moveit_studio::behaviors::AddURDF::kDefaultUrdfFilePathPort = "urdf_file_path"
staticconstexpr

◆ kDefaultUrdfNamePort

constexpr auto moveit_studio::behaviors::AddURDF::kDefaultUrdfNamePort = "urdf_name"
staticconstexpr

◆ kDefaultUrdfPosePort

constexpr auto moveit_studio::behaviors::AddURDF::kDefaultUrdfPosePort = "urdf_pose"
staticconstexpr

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