Skip to main content

AddCollisionObject Class

Adds a user-supplied CollisionObject to the planning scene. More...

Declaration

class moveit_pro::behaviors::AddCollisionObject { ... }

Included Headers

#include <add_collision_object.hpp>

Base class

classAddCollisionObjectBase

Abstract base for Behaviors that add a CollisionObject to the planning scene. More...

Public Constructors Index

AddCollisionObject (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
AddCollisionObject (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< PlanningSceneBridge > bridge)

Private Member Functions Index

tl::expected< moveit_msgs::msg::CollisionObject, std::string >buildCollisionObject () override

Build the CollisionObject to apply to the planning scene. More...

Public Static Functions Index

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

Description

Adds a user-supplied CollisionObject to the planning scene.

Reads a CollisionObject from the collision_object input port and adds it to a planning scene. By default the Behavior modifies the live planning scene via service calls. Wire the planning_scene port to modify a supplied moveit_msgs::msg::PlanningScene message instead; the modified scene is written back to the same port and no services are called. See AddCollisionObjectBase for details on the two modes and the overwrite port semantics.

Returns FAILURE when the collision_object input port is not set, when id is empty, when header.frame_id is empty, when subframe_names.size() != subframe_poses.size(), when overwrite=false and a world entry with the same id is already present, when an entry with the same id is currently attached to the robot, or when a required service call fails in live scene mode.

Data Port NamePort TypeObject Type
collision_objectinputmoveit_msgs::msg::CollisionObject
overwriteinputbool
planning_scenebidirectionalmoveit_msgs::msg::PlanningScene

Definition at line 34 of file add_collision_object.hpp.

Public Constructors

AddCollisionObject()

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

Declaration at line 37 of file add_collision_object.hpp, definition at line 40 of file add_collision_object.cpp.

AddCollisionObject()

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

Declaration at line 40 of file add_collision_object.hpp, definition at line 46 of file add_collision_object.cpp.

Private Member Functions

buildCollisionObject()

tl::expected< moveit_msgs::msg::CollisionObject, std::string > moveit_pro::behaviors::AddCollisionObject::buildCollisionObject ()
virtual

Build the CollisionObject to apply to the planning scene.

Returns

The CollisionObject on success, or a descriptive error message on failure.

Declaration at line 48 of file add_collision_object.hpp, definition at line 69 of file add_collision_object.cpp.

Public Static Functions

metadata()

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

Declaration at line 45 of file add_collision_object.hpp, definition at line 64 of file add_collision_object.cpp.

providedPorts()

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

Declaration at line 44 of file add_collision_object.hpp, definition at line 53 of file add_collision_object.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.