Skip to main content

CropOrRemovePointsInBox Class Template

Behavior for either cropping or removing points from a box-shaped region of interest. The dimensions and size of the region of interest are defined relative to its centroid. More...

Declaration​

template <CropOrRemovePointsInBoxModes mode>
class moveit_pro::behaviors::CropOrRemovePointsInBox<mode> { ... }

Included Headers​

#include <crop_or_remove_points_in_box.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​

template <CropOrRemovePointsInBoxModes mode>
CropOrRemovePointsInBox (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)

Public Member Functions Index​

template <CropOrRemovePointsInBoxModes mode>
BT::PortsListprovidedPorts ()
template <CropOrRemovePointsInBoxModes mode>
BT::PortsListprovidedPorts ()

Private Member Functions Index​

template <CropOrRemovePointsInBoxModes mode>
auto doWork () override -> tl::expected< bool, std::string >

Retrieves required input values, looks up the transform between the box reference frame and the point cloud origin frame, performs the filter operation, and writes the filtered point cloud to the output data port. More...

template <CropOrRemovePointsInBoxModes mode>
auto getFuture () override -> std::shared_future< tl::expected< bool, std::string > > &

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

Private Member Attributes Index​

template <CropOrRemovePointsInBoxModes mode>
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​

template <CropOrRemovePointsInBoxModes mode>
static BT::PortsListprovidedPorts ()
template <CropOrRemovePointsInBoxModes mode>
static BT::KeyValueVectormetadata ()

Description​

Behavior for either cropping or removing points from a box-shaped region of interest. The dimensions and size of the region of interest are defined relative to its centroid.

The centroid pose is interpreted in its own header.frame_id, and the point cloud is transformed into that frame at the cloud's timestamp. The box size is a 3-element {X, Y, Z} vector of full extents in meters, centered on the centroid pose.

For CropPointsInBox:

Data Port NamePort TypeObject Type
point_cloudinputsensor_msgs::msg::PointCloud2
crop_box_centroid_poseinputgeometry_msgs::msg::PoseStamped
crop_box_sizeinputstd::vector<double>
point_cloud_croppedoutputsensor_msgs::msg::PointCloud2

For RemovePointsInBox:

Data Port NamePort TypeObject Type
point_cloudinputsensor_msgs::msg::PointCloud2
remove_box_centroid_poseinputgeometry_msgs::msg::PoseStamped
remove_box_sizeinputstd::vector<double>
point_cloud_culledoutputsensor_msgs::msg::PointCloud2

Definition at line 47 of file crop_or_remove_points_in_box.hpp.

Public Constructors​

CropOrRemovePointsInBox()​

template <CropOrRemovePointsInBoxModes mode>
moveit_pro::behaviors::CropOrRemovePointsInBox< mode >::CropOrRemovePointsInBox (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources)

Declaration at line 50 of file crop_or_remove_points_in_box.hpp, definition at line 60 of file crop_or_remove_points_in_box.cpp.

Public Member Functions​

providedPorts()​

template <CropOrRemovePointsInBoxModes mode>
BT::PortsList moveit_pro::behaviors::CropOrRemovePointsInBox< CropOrRemovePointsInBoxModes::CROP >::providedPorts ()

Definition at line 67 of file crop_or_remove_points_in_box.cpp.

providedPorts()​

template <CropOrRemovePointsInBoxModes mode>
BT::PortsList moveit_pro::behaviors::CropOrRemovePointsInBox< CropOrRemovePointsInBoxModes::REMOVE >::providedPorts ()

Definition at line 82 of file crop_or_remove_points_in_box.cpp.

Private Member Functions​

doWork()​

template <CropOrRemovePointsInBoxModes mode>
tl::expected< bool, std::string > moveit_pro::behaviors::CropOrRemovePointsInBox< mode >::doWork ()
virtual

Retrieves required input values, looks up the transform between the box reference frame and the point cloud origin frame, performs the filter operation, and writes the filtered point cloud to the output data port.

Returns

Returns true if the point cloud was filtered successfully. Returns an error message otherwise.

Declaration at line 63 of file crop_or_remove_points_in_box.hpp, definition at line 104 of file crop_or_remove_points_in_box.cpp.

getFuture()​

template <CropOrRemovePointsInBoxModes mode>
std::shared_future< tl::expected< bool, std::string > > & moveit_pro::behaviors::CropOrRemovePointsInBox< mode >::getFuture ()
inline virtual

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

Definition at line 66 of file crop_or_remove_points_in_box.hpp.

Private Member Attributes​

future_​

template <CropOrRemovePointsInBoxModes mode>
std::shared_future<tl::expected<bool, std::string> > moveit_pro::behaviors::CropOrRemovePointsInBox< mode >::future_

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

Definition at line 72 of file crop_or_remove_points_in_box.hpp.

Public Static Functions​

metadata()​

template <CropOrRemovePointsInBoxModes mode>
BT::KeyValueVector moveit_pro::behaviors::CropOrRemovePointsInBox< mode >::metadata ()
static

Declaration at line 55 of file crop_or_remove_points_in_box.hpp, definition at line 96 of file crop_or_remove_points_in_box.cpp.

providedPorts()​

template <CropOrRemovePointsInBoxModes mode>
BT::PortsList moveit_pro::behaviors::CropOrRemovePointsInBox< mode >::providedPorts ()
static

Definition at line 53 of file crop_or_remove_points_in_box.hpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.