Skip to main content

FitLineSegmentToMask3D Class

Finds the line segment that best fits a point cloud fragment. More...

Declaration

class moveit_pro::behaviors::FitLineSegmentToMask3D { ... }

Included Headers

#include <fit_line_segment_to_mask3d.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

FitLineSegmentToMask3D (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
FitLineSegmentToMask3D (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, const moveit_pro::common::visualization::VisualizationClient &visualization_client)

Alternate constructor to allow mocking the rviz_visual_tools interface. More...

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...

moveit_pro::common::visualization::VisualizationClientvisualization_client_

Public Static Functions Index

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

Description

Finds the line segment that best fits a point cloud fragment.

The point cloud fragment is defined by a 3D mask over an input point cloud. The line parameters are estimated with the RANSAC algorithm. The RANSAC iterative process hypothesizes line models from random point subsets, selecting the hypothesis that explains the most points in the set. A point is considered explained by a line hypothesis (a.k.a. "inlier") if it is closer than a distance threshold to it. The output segment is contained in the resulting line, and is the shortest segment containing all inlier points.

Data Port NamePort TypeObject Type
point_cloudinputsensor_msgs::msg::PointCloud2
masks3dinputstd::vector<moveit_studio_vision_msgs::msg::Mask3D>
base_frameinputstd::string
max_distance_from_line_for_inlierinputdouble
line_segment_posesoutputstd::vector<geometry_msgs::msg::PoseStamped>

Definition at line 33 of file fit_line_segment_to_mask3d.hpp.

Public Constructors

FitLineSegmentToMask3D()

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

Declaration at line 36 of file fit_line_segment_to_mask3d.hpp, definition at line 62 of file fit_line_segment_to_mask3d.cpp.

FitLineSegmentToMask3D()

moveit_pro::behaviors::FitLineSegmentToMask3D::FitLineSegmentToMask3D (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources, const moveit_pro::common::visualization::VisualizationClient & visualization_client)

Alternate constructor to allow mocking the rviz_visual_tools interface.

Declaration at line 40 of file fit_line_segment_to_mask3d.hpp, definition at line 69 of file fit_line_segment_to_mask3d.cpp.

Private Member Functions

doWork()

tl::expected< bool, std::string > moveit_pro::behaviors::FitLineSegmentToMask3D::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 49 of file fit_line_segment_to_mask3d.hpp, definition at line 101 of file fit_line_segment_to_mask3d.cpp.

getFuture()

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

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

Definition at line 51 of file fit_line_segment_to_mask3d.hpp.

Private Member Attributes

future_

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

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

Definition at line 57 of file fit_line_segment_to_mask3d.hpp.

visualization_client_

moveit_pro::common::visualization::VisualizationClient moveit_pro::behaviors::FitLineSegmentToMask3D::visualization_client_

Definition at line 59 of file fit_line_segment_to_mask3d.hpp.

Public Static Functions

metadata()

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

Declaration at line 46 of file fit_line_segment_to_mask3d.hpp, definition at line 95 of file fit_line_segment_to_mask3d.cpp.

providedPorts()

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

Declaration at line 44 of file fit_line_segment_to_mask3d.hpp, definition at line 77 of file fit_line_segment_to_mask3d.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.