Skip to main content

MergePointClouds Class

Merges a number of input point clouds into a single one. More...

Declaration

class moveit_pro::behaviors::MergePointClouds { ... }

Included Headers

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

MergePointClouds (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

Merges a number of input point clouds into a single one.

All point clouds must be expressed in the same reference frame. The input point clouds are projected onto a voxel grid with the given resolution. Each voxel produces a point in the output cloud that is the average of all input points projected on that voxel. If align_point_clouds is true, the input clouds are incrementally aligned using the Iterative Closest Point (ICP) algorithm.

Data Port NamePort TypeObject Type
point_cloudsinputstd::vector<sensor_msgs::msg::PointCloud2>
grid_resolution_metersinputdouble
align_point_cloudsinputbool
icp_max_iterationsinputint
icp_correspondence_distanceinputdouble
merged_cloudoutputsensor_msgs::msg::PointCloud2

Definition at line 32 of file merge_pointclouds.hpp.

Public Constructors

MergePointClouds()

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

Declaration at line 35 of file merge_pointclouds.hpp, definition at line 101 of file merge_pointclouds.cpp.

Private Member Functions

doWork()

tl::expected< bool, std::string > moveit_pro::behaviors::MergePointClouds::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 43 of file merge_pointclouds.hpp, definition at line 135 of file merge_pointclouds.cpp.

getFuture()

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

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

Definition at line 45 of file merge_pointclouds.hpp.

Private Member Attributes

future_

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

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

Definition at line 51 of file merge_pointclouds.hpp.

Public Static Functions

metadata()

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

Declaration at line 40 of file merge_pointclouds.hpp, definition at line 129 of file merge_pointclouds.cpp.

providedPorts()

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

Declaration at line 38 of file merge_pointclouds.hpp, definition at line 107 of file merge_pointclouds.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.