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

Abstract Class representing the logic for estimating the center position of a cone. More...

#include <center_calculation.hpp>

Inheritance diagram for CenterCalculator:
Inheritance graph
Collaboration diagram for CenterCalculator:
Collaboration graph

Public Member Functions

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

Detailed Description

Abstract Class representing the logic for estimating the center position of a cone.

This class provides an interface for various methods to estimate the center position of a cone based on its point cloud data, optionally considering a ground plane.

Definition at line 14 of file center_calculation.hpp.

Member Function Documentation

◆ calculate_center()

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

Estimates the center position of a cone.

This method takes a point cloud representing a cone's cluster and optionally a ground plane to refine the center estimation. The center position is returned as a 4-dimensional vector (Eigen::Vector4f).

Parameters
point_cloudPointer to the point cloud representing the cone's cluster.
planePlane representing the ground (optional). Default is an empty Plane object.
Returns
Eigen::Vector4f representing the estimated center of the cone.

Implemented in CentroidCalculator, and CircunferenceCenterCalculator.


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