Easy Navigation
|
Provides efficient, non-destructive, chainable operations over a set of point-based perceptions. More...
#include <PointPerception.hpp>
Classes | |
struct | VoxelKey |
Represents a discrete 3D voxel index for downsampling. More... | |
struct | VoxelKeyHash |
Hash function for VoxelKey. More... | |
Public Member Functions | |
pcl::PointCloud< pcl::PointXYZ > | as_points () const |
Retrieves all selected points as a single cloud. | |
const pcl::PointCloud< pcl::PointXYZ > & | as_points (int idx) const |
Retrieves the filtered point cloud for a specific perception. | |
std::shared_ptr< PointPerceptionsOpsView > | collapse (const std::vector< double > &collapse_dims) const |
Collapses dimensions to fixed values (e.g., project onto plane). | |
PointPerceptionsOpsView & | downsample (double resolution) |
Downsamples each perception using a voxel grid. | |
PointPerceptionsOpsView & | filter (const std::vector< double > &min_bounds, const std::vector< double > &max_bounds) |
Filters all point clouds by spatial bounds. | |
std::shared_ptr< PointPerceptionsOpsView > | fuse (const std::string &target_frame) const |
Fuses all perceptions into one, transforming them to a common frame. | |
const PointPerceptions & | get_perceptions () const |
Gets a reference to the underlying perceptions container. | |
PointPerceptionsOpsView (const PointPerceptions &perceptions) | |
Constructor using a constant reference to a container of perceptions. | |
PointPerceptionsOpsView (PointPerceptions &&perceptions) | |
Constructor that takes ownership of the container. | |
Provides efficient, non-destructive, chainable operations over a set of point-based perceptions.
This class allows filtering, downsampling, fusion, and collapsing of multiple point clouds without duplicating memory, by using index-based views.
|
explicit |
Constructor using a constant reference to a container of perceptions.
perceptions | Container of perceptions to view. |
|
explicit |
Constructor that takes ownership of the container.
perceptions | Rvalue container of perceptions. |
pcl::PointCloud< pcl::PointXYZ > as_points | ( | ) | const |
Retrieves all selected points as a single cloud.
const pcl::PointCloud< pcl::PointXYZ > & as_points | ( | int | idx | ) | const |
Retrieves the filtered point cloud for a specific perception.
idx | Index of the perception. |
std::shared_ptr< PointPerceptionsOpsView > collapse | ( | const std::vector< double > & | collapse_dims | ) | const |
Collapses dimensions to fixed values (e.g., project onto plane).
collapse_dims | Fixed values for each axis (use NAN to preserve original values). |
PointPerceptionsOpsView & downsample | ( | double | resolution | ) |
Downsamples each perception using a voxel grid.
resolution | Size of the voxel in meters. |
PointPerceptionsOpsView & filter | ( | const std::vector< double > & | min_bounds, |
const std::vector< double > & | max_bounds ) |
Filters all point clouds by spatial bounds.
min_bounds | Minimum [x, y, z] values (use NAN to disable per axis). |
max_bounds | Maximum [x, y, z] values (use NAN to disable per axis). |
std::shared_ptr< PointPerceptionsOpsView > fuse | ( | const std::string & | target_frame | ) | const |
Fuses all perceptions into one, transforming them to a common frame.
target_frame | Frame ID to transform all clouds into. |
const PointPerceptions & get_perceptions | ( | ) | const |
Gets a reference to the underlying perceptions container.