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

Validates clusters using a cylinder approximation. More...

#include <cylinder_validator.hpp>

Inheritance diagram for CylinderValidator:
Inheritance graph
Collaboration diagram for CylinderValidator:
Collaboration graph

Public Member Functions

 CylinderValidator (double small_width, double small_height, double large_width, double large_height, double out_distance_cap)
 Constructs a new CylinderValidator object with specified width and height.
 
double small_getRadius () const
 Gets the radius of the cylinder for small cones.
 
double large_getRadius () const
 Gets the radius of the cylinder for large cones.
 
std::vector< double > coneValidator (Cluster *cone_point_cloud, Plane &plane) const override
 Validates a cluster using cylinder approximation.
 

Private Attributes

double small_width
 Width of the cylinder for a small cone.
 
double small_height
 Height of the cylinder for a small cone.
 
double large_width
 Width of the cylinder for a large cone.
 
double large_height
 Height of the cylinder for a large cone.
 
double out_distance_cap
 Minimum out_distance value for it to be 0.
 

Detailed Description

Validates clusters using a cylinder approximation.

The CylinderValidator class inherits from the ConeValidator class and implements cluster validation using a cylinder approximation. It provides methods to set and retrieve cylinder dimensions and to perform validation of clusters.

Definition at line 13 of file cylinder_validator.hpp.

Constructor & Destructor Documentation

◆ CylinderValidator()

CylinderValidator::CylinderValidator ( double  small_width,
double  small_height,
double  large_width,
double  large_height,
double  out_distance_cap 
)

Constructs a new CylinderValidator object with specified width and height.

Parameters
small_widthThe width of the cylinder for a small cone.
small_heightThe height of the cylinder for a small cone.
large_widthThe width of the cylinder for a large cone.
large_heightThe height of the cylinder for a large cone.
out_distance_capMinimum out_distance value for a cluster to have a 0 result.

Definition at line 3 of file cylinder_validator.cpp.

Member Function Documentation

◆ coneValidator()

std::vector< double > CylinderValidator::coneValidator ( Cluster cone_point_cloud,
Plane plane 
) const
overridevirtual

Validates a cluster using cylinder approximation.

Parameters
cone_point_cloudPointer to the cluster to be validated.
Returns
Vector containing:
Index 0 -> Ratio of between distance to the farthest point and the cylinder radius.| Index 1 -> Ratio of between distance to the farthest point and the cylinder heigth.| Index 2 -> Ratio between the number of points outside the cylinder and the total.

Implements ConeValidator.

Definition at line 15 of file cylinder_validator.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ large_getRadius()

double CylinderValidator::large_getRadius ( ) const

Gets the radius of the cylinder for large cones.

Returns
The radius of the cylinder for large cones.

Definition at line 13 of file cylinder_validator.cpp.

Here is the caller graph for this function:

◆ small_getRadius()

double CylinderValidator::small_getRadius ( ) const

Gets the radius of the cylinder for small cones.

Returns
The radius of the cylinder for small cones.

Definition at line 11 of file cylinder_validator.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ large_height

double CylinderValidator::large_height
private

Height of the cylinder for a large cone.

Definition at line 52 of file cylinder_validator.hpp.

◆ large_width

double CylinderValidator::large_width
private

Width of the cylinder for a large cone.

Definition at line 51 of file cylinder_validator.hpp.

◆ out_distance_cap

double CylinderValidator::out_distance_cap
private

Minimum out_distance value for it to be 0.

Definition at line 53 of file cylinder_validator.hpp.

◆ small_height

double CylinderValidator::small_height
private

Height of the cylinder for a small cone.

Definition at line 50 of file cylinder_validator.hpp.

◆ small_width

double CylinderValidator::small_width
private

Width of the cylinder for a small cone.

Definition at line 49 of file cylinder_validator.hpp.


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