Skip to main content

AddCollisionMesh Class

Adds a mesh CollisionObject to the planning scene. More...

Declaration

class moveit_pro::behaviors::AddCollisionMesh { ... }

Included Headers

#include <add_collision_mesh.hpp>

Base class

classAddCollisionObjectBase

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

Public Constructors Index

AddCollisionMesh (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
AddCollisionMesh (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 mesh CollisionObject to the planning scene.

Reads object_id, mesh_file_path, pose, and an optional scale from the input ports. Loads the mesh from the URI, builds a CollisionObject with one mesh shape, 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.

The scale port defaults to {1.0; 1.0; 1.0} (native size). Wire it to stretch the mesh per-axis in its local frame; values are semicolon-separated, e.g. 2.0;2.0;2.0 to double the mesh uniformly.

Returns FAILURE when object_id is empty, when mesh_file_path is empty, when scale does not contain exactly 3 elements, when any scale component is non-finite or not greater than 0, when pose.header.frame_id is empty, when the mesh resource cannot be loaded, 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
object_idinputstd::string
mesh_file_pathinputstd::string
poseinputgeometry_msgs::msg::PoseStamped
overwriteinputbool
planning_scenebidirectionalmoveit_msgs::msg::PlanningScene
scaleinputstd::vector<double>

Definition at line 65 of file add_collision_mesh.hpp.

Public Constructors

AddCollisionMesh()

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

Declaration at line 68 of file add_collision_mesh.hpp, definition at line 128 of file add_collision_mesh.cpp.

AddCollisionMesh()

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

Declaration at line 71 of file add_collision_mesh.hpp, definition at line 134 of file add_collision_mesh.cpp.

Private Member Functions

buildCollisionObject()

tl::expected< moveit_msgs::msg::CollisionObject, std::string > moveit_pro::behaviors::AddCollisionMesh::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 79 of file add_collision_mesh.hpp, definition at line 167 of file add_collision_mesh.cpp.

Public Static Functions

metadata()

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

Declaration at line 76 of file add_collision_mesh.hpp, definition at line 162 of file add_collision_mesh.cpp.

providedPorts()

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

Declaration at line 75 of file add_collision_mesh.hpp, definition at line 141 of file add_collision_mesh.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.