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

Concrete Class representing a centroid-based method for estimating the center position of a cone. More...

#include <centroid_calculation.hpp>

Inheritance diagram for CentroidCalculator:
Inheritance graph
Collaboration diagram for CentroidCalculator:
Collaboration graph

Public Member Functions

Eigen::Vector4f calculate_center (const sensor_msgs::msg::PointCloud2::SharedPtr &point_cloud, const std::vector< int > &point_indices, const Plane &plane=Plane()) const override
 Estimates the center position of a cone using centroid calculation.
 

Detailed Description

Concrete Class representing a centroid-based method for estimating the center position of a cone.

This class implements the CenterCalculator interface to provide a method for estimating the center position of a cone based on its point cloud data, using centroid calculation.

Definition at line 11 of file centroid_calculation.hpp.

Member Function Documentation

◆ calculate_center()

Eigen::Vector4f CentroidCalculator::calculate_center ( const sensor_msgs::msg::PointCloud2::SharedPtr &  point_cloud,
const std::vector< int > &  point_indices,
const Plane plane = Plane() 
) const
overridevirtual

Estimates the center position of a cone using centroid calculation.

This method estimates the center position of a cone by calculating the centroid of its point cloud data.

Parameters
point_cloudPointer to the point cloud representing the cone's cluster.
planePlane representing the ground [Not used in this concrete implementation]
Returns
Eigen::Vector4f representing the estimated center of the cone.

Implements CenterCalculator.

Definition at line 3 of file centroid_calculation.cpp.

Here is the call graph for this function:

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