Skip to main content

FindSingularCuboids Class

Finds well-singulated cuboids supported by a surface within a point cloud. More...

Declaration​

class moveit_pro::behaviors::FindSingularCuboids { ... }

Included Headers​

#include <find_singular_cuboids.hpp>

Base class​

classSharedResourcesNode<BehaviorTreeNodeT>

The SharedResourcesNode class provides a BehaviorContext object when constructing a BehaviorTree.Cpp node. More...

Public Constructors Index​

FindSingularCuboids (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)

Public Member Functions Index​

BT::NodeStatusonStart () override
BT::NodeStatusonRunning () override
voidonHalted () override

Private Member Functions Index​

tl::expected< void, std::string >compute (const sensor_msgs::msg::PointCloud2 &point_cloud_msg, const moveit_studio::point_cloud_tools::SingularCuboidFinderConfig &config, const std::string &base_frame)

Extract cuboids from the point cloud and set detected cuboids as an output data port. More...

Private Member Attributes Index​

rviz_visual_tools::RvizVisualToolsPtrvisual_tools_

Tool to publish debug visualizations. More...

BT::NodeStatusstatus_

Holds the behavior status. More...

ThreadedFuture< tl::expected< void, std::string > >compute_future_

Future associated with the asynchronous compute process. More...

Public Static Functions Index​

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

Public Static Attributes Index​

static constexpr autokPortIDPointCloud = "point_cloud"
static constexpr autokPortIDBaseFrame = "base_frame"
static constexpr autokPortIDPlaneModelThreshold = "plane_model_threshold"
static constexpr autokPortIDClusterDistanceThreshold = "cluster_distance_threshold"
static constexpr autokPortIDCropBoxOriginXYZ = "crop_box_origin_xyz"
static constexpr autokPortIDCropBoxSizeXYZ = "crop_box_size_xyz"
static constexpr autokPortIDDetectedShapes = "detected_shapes"

Description​

Finds well-singulated cuboids supported by a surface within a point cloud.

This behavior makes some assumptions about the environment:

  • The input point cloud must include a large flat surface, such as a tabletop or floor.
  • The filtering and cropping steps are expected to remove all points which are far away from this surface.
  • After filtering, all remaining clusters of points are assumed to be objects which are supported by the surface.

The output GraspableObjects will be transformed so that their parent frame is the frame defined by the base_frame config parameter.

Data Port NamePort TypeObject Type
point_cloudinputsensor_msgs::msg::PointCloud2
base_frameinputstd::string
plane_model_thresholdinputdouble
cluster_distance_thresholdinputdouble
crop_box_origin_xyzinputstd::vector<double>
crop_box_size_xyzinputstd::vector<double>
detected_shapesoutputstd::vector<GraspableObject>

Definition at line 41 of file find_singular_cuboids.hpp.

Public Constructors​

FindSingularCuboids()​

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

Declaration at line 53 of file find_singular_cuboids.hpp, definition at line 89 of file find_singular_cuboids.cpp.

Public Member Functions​

onHalted()​

void moveit_pro::behaviors::FindSingularCuboids::onHalted ()

Declaration at line 60 of file find_singular_cuboids.hpp, definition at line 225 of file find_singular_cuboids.cpp.

onRunning()​

BT::NodeStatus moveit_pro::behaviors::FindSingularCuboids::onRunning ()

Declaration at line 58 of file find_singular_cuboids.hpp, definition at line 202 of file find_singular_cuboids.cpp.

onStart()​

BT::NodeStatus moveit_pro::behaviors::FindSingularCuboids::onStart ()

Declaration at line 56 of file find_singular_cuboids.hpp, definition at line 130 of file find_singular_cuboids.cpp.

Private Member Functions​

compute()​

tl::expected< void, std::string > moveit_pro::behaviors::FindSingularCuboids::compute (const sensor_msgs::msg::PointCloud2 & point_cloud_msg, const moveit_studio::point_cloud_tools::SingularCuboidFinderConfig & config, const std::string & base_frame)

Extract cuboids from the point cloud and set detected cuboids as an output data port.

Parameters
point_cloud_msg

Point cloud to process.

config

Settings to configure point cloud processing.

Returns

BT::NodeStatus::SUCCESS if cuboid detection succeeded. BT::NodeStatus::FAILURE if there was an error.

Declaration at line 74 of file find_singular_cuboids.hpp, definition at line 233 of file find_singular_cuboids.cpp.

Private Member Attributes​

compute_future_​

ThreadedFuture<tl::expected<void, std::string> > moveit_pro::behaviors::FindSingularCuboids::compute_future_

Future associated with the asynchronous compute process.

When set, will contain a result that shows if the process succeeded or failed. Declared last so its joining destructor runs before any sibling member the background task dereferences is destroyed.

Definition at line 91 of file find_singular_cuboids.hpp.

status_​

BT::NodeStatus moveit_pro::behaviors::FindSingularCuboids::status_

Holds the behavior status.

Definition at line 84 of file find_singular_cuboids.hpp.

visual_tools_​

rviz_visual_tools::RvizVisualToolsPtr moveit_pro::behaviors::FindSingularCuboids::visual_tools_

Tool to publish debug visualizations.

Definition at line 80 of file find_singular_cuboids.hpp.

Public Static Functions​

metadata()​

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

Declaration at line 64 of file find_singular_cuboids.hpp, definition at line 124 of file find_singular_cuboids.cpp.

providedPorts()​

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

Declaration at line 62 of file find_singular_cuboids.hpp, definition at line 98 of file find_singular_cuboids.cpp.

Public Static Attributes​

kPortIDBaseFrame​

constexpr auto moveit_pro::behaviors::FindSingularCuboids::kPortIDBaseFrame = "base_frame"
constexpr static

Definition at line 46 of file find_singular_cuboids.hpp.

kPortIDClusterDistanceThreshold​

constexpr auto moveit_pro::behaviors::FindSingularCuboids::kPortIDClusterDistanceThreshold = "cluster_distance_threshold"
constexpr static

Definition at line 48 of file find_singular_cuboids.hpp.

kPortIDCropBoxOriginXYZ​

constexpr auto moveit_pro::behaviors::FindSingularCuboids::kPortIDCropBoxOriginXYZ = "crop_box_origin_xyz"
constexpr static

Definition at line 49 of file find_singular_cuboids.hpp.

kPortIDCropBoxSizeXYZ​

constexpr auto moveit_pro::behaviors::FindSingularCuboids::kPortIDCropBoxSizeXYZ = "crop_box_size_xyz"
constexpr static

Definition at line 50 of file find_singular_cuboids.hpp.

kPortIDDetectedShapes​

constexpr auto moveit_pro::behaviors::FindSingularCuboids::kPortIDDetectedShapes = "detected_shapes"
constexpr static

Definition at line 51 of file find_singular_cuboids.hpp.

kPortIDPlaneModelThreshold​

constexpr auto moveit_pro::behaviors::FindSingularCuboids::kPortIDPlaneModelThreshold = "plane_model_threshold"
constexpr static

Definition at line 47 of file find_singular_cuboids.hpp.

kPortIDPointCloud​

constexpr auto moveit_pro::behaviors::FindSingularCuboids::kPortIDPointCloud = "point_cloud"
constexpr static

Definition at line 45 of file find_singular_cuboids.hpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.