Skip to main content

GetContourFromPointCloudSlice Class

Extracts contours from a point cloud slice. More...

Declaration

class moveit_pro::behaviors::GetContourFromPointCloudSlice { ... }

Included Headers

#include <get_contour_from_pointcloud_slice.hpp>

Base class

classAsyncBehaviorBase

A base class for behaviors which need to asynchronously run a function that might take a long time to complete. More...

Public Constructors Index

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

Private Member Functions Index

tl::expected< bool, std::string >doWork () override

User-implemented function which handles executing the potentially-long-running process. More...

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

std::shared_future< tl::expected< bool, std::string > >future_

Classes derived from AsyncBehaviorBase must have this shared_future as a class member. More...

Public Static Functions Index

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

Description

Extracts contours from a point cloud slice.

This behavior takes a point cloud and extracts 2D contours from a specified slice of the cloud and an angle range. The slice is defined by a plane normal and distance from origin.

The max_pose_spacing parameter sets a maximum distance between consecutive waypoints:

  • Waypoints farther apart than this value will be interpolated with additional waypoints
  • Waypoints closer than this value are preserved to maintain contour accuracy
  • This ensures the output path captures the contour shape while limiting maximum spacing
Data Port NamePort TypeObject Type
input_cloudinputsensor_msgs::msg::PointCloud2
slice_planeinputgeometry_msgs::msg::PoseStamped
slice_distance_from_planeinputdouble
contour_crop_angle_startinputdouble
contour_crop_angle_spaninputdouble
hull_alphainputdouble
max_pose_spacinginputdouble
contour_pathoutputstd::vector<geometry_msgs::msg::PoseStamped>

Definition at line 36 of file get_contour_from_pointcloud_slice.hpp.

Public Constructors

GetContourFromPointCloudSlice()

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

Declaration at line 39 of file get_contour_from_pointcloud_slice.hpp, definition at line 125 of file get_contour_from_pointcloud_slice.cpp.

Private Member Functions

doWork()

tl::expected< bool, std::string > moveit_pro::behaviors::GetContourFromPointCloudSlice::doWork ()
virtual

User-implemented function which handles executing the potentially-long-running process.

This function is called within an async process in a separate thread.

Returns

A tl::expected which contains a bool indicating task success if the process completed successfully or was canceled, or an error message if the process failed unexpectedly.

Declaration at line 47 of file get_contour_from_pointcloud_slice.hpp, definition at line 180 of file get_contour_from_pointcloud_slice.cpp.

getFuture()

std::shared_future< tl::expected< bool, std::string > > & moveit_pro::behaviors::GetContourFromPointCloudSlice::getFuture ()
inline virtual

Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member.

Definition at line 49 of file get_contour_from_pointcloud_slice.hpp.

Private Member Attributes

future_

std::shared_future<tl::expected<bool, std::string> > moveit_pro::behaviors::GetContourFromPointCloudSlice::future_

Classes derived from AsyncBehaviorBase must have this shared_future as a class member.

Definition at line 55 of file get_contour_from_pointcloud_slice.hpp.

Public Static Functions

metadata()

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

Declaration at line 44 of file get_contour_from_pointcloud_slice.hpp, definition at line 174 of file get_contour_from_pointcloud_slice.cpp.

providedPorts()

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

Declaration at line 42 of file get_contour_from_pointcloud_slice.hpp, definition at line 132 of file get_contour_from_pointcloud_slice.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.