CropPointsInSphere Class
Given a point cloud and a sphere-shaped region of interest, create a new point cloud which contains only the points that are inside the region of interest. The dimensions and size of the region of interest are defined relative to its centroid. More...
Declaration
Included Headers
Base class
| class | AsyncBehaviorBase |
|
A base class for behaviors which need to asynchronously run a function that might take a long time to complete. More... | |
Public Constructors Index
| CropPointsInSphere (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 |
|
Retrieves required input values, looks up the transform between the sphere reference frame and the point cloud origin frame, performs the crop operation, and writes the cropped point cloud to the output data port. 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::PortsList | providedPorts () |
| static BT::KeyValueVector | metadata () |
Description
Given a point cloud and a sphere-shaped region of interest, create a new point cloud which contains only the points that are inside the region of interest. The dimensions and size of the region of interest are defined relative to its centroid.
| Data Port Name | Port Type | Object Type |
|---|---|---|
| point_cloud | input | sensor_msgs::msg::PointCloud2 |
| crop_sphere_centroid_pose | input | geometry_msgs::msg::PoseStamped |
| crop_sphere_radius | input | double |
| point_cloud_cropped | output | sensor_msgs::msg::PointCloud2 |
Definition at line 26 of file crop_points_in_sphere.hpp.
Public Constructors
CropPointsInSphere()
|
Declaration at line 29 of file crop_points_in_sphere.hpp, definition at line 46 of file crop_points_in_sphere.cpp.
Private Member Functions
doWork()
| virtual |
Retrieves required input values, looks up the transform between the sphere reference frame and the point cloud origin frame, performs the crop operation, and writes the cropped point cloud to the output data port.
- Returns
Returns true if the point cloud was cropped successfully. Returns an error message otherwise.
Declaration at line 42 of file crop_points_in_sphere.hpp, definition at line 75 of file crop_points_in_sphere.cpp.
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 crop_points_in_sphere.hpp.
Private Member Attributes
future_
|
Classes derived from AsyncBehaviorBase must have this shared_future as a class member.
Definition at line 51 of file crop_points_in_sphere.hpp.
Public Static Functions
metadata()
| static |
Declaration at line 34 of file crop_points_in_sphere.hpp, definition at line 69 of file crop_points_in_sphere.cpp.
providedPorts()
| static |
Declaration at line 32 of file crop_points_in_sphere.hpp, definition at line 52 of file crop_points_in_sphere.cpp.
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.