Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
GridClustering Class Reference

Grid-based clustering algorithm implementation. More...

#include <grid_clustering.hpp>

Inheritance diagram for GridClustering:
Inheritance graph
Collaboration diagram for GridClustering:
Collaboration graph

Public Member Functions

 GridClustering (double grid_angle, double grid_radius, double start_augmentation, double radius_augmentation, double fov)
 Constructor for the GridClustering algorithm.
 
void clustering (const sensor_msgs::msg::PointCloud2::SharedPtr &point_cloud, std::vector< Cluster > *clusters) const override
 Clusters the input point cloud into groups using the GridClustering algorithm.
 

Private Attributes

GridGeometry grid_geometry_
 Geometry of the grid used for clustering.
 

Detailed Description

Grid-based clustering algorithm implementation.

implementation.

The GridClustering class is a concrete implementation of the Clustering interface, using a grid-based algorithm to cluster point clouds based on spatial partitioning.

Definition at line 18 of file grid_clustering.hpp.

Constructor & Destructor Documentation

◆ GridClustering()

GridClustering::GridClustering ( double  grid_angle,
double  grid_radius,
double  start_augmentation,
double  radius_augmentation,
double  fov 
)

Constructor for the GridClustering algorithm.

Parameters
grid_widthWidth of each grid cell.
max_points_per_clusterMaximum number of points allowed in each cluster.
min_points_per_clusterMinimum number of points required to form a cluster.

Definition at line 3 of file grid_clustering.cpp.

Member Function Documentation

◆ clustering()

void GridClustering::clustering ( const sensor_msgs::msg::PointCloud2::SharedPtr &  point_cloud,
std::vector< Cluster > *  clusters 
) const
overridevirtual

Clusters the input point cloud into groups using the GridClustering algorithm.

This function implements the clustering method from the Clustering interface.

Parameters
point_cloudA shared pointer to a point cloud of type pcl::PointCloud<pcl::PointXYZI>.
clustersA pointer to a vector of shared pointers to point clouds to store the resulting clusters.

Implements Clustering.

Definition at line 7 of file grid_clustering.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ grid_geometry_

GridGeometry GridClustering::grid_geometry_
private

Geometry of the grid used for clustering.

Definition at line 43 of file grid_clustering.hpp.


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