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

class that evaluates the cluster as a cone or not More...

#include <cone_evaluator.hpp>

Collaboration diagram for ConeEvaluator:
Collaboration graph

Public Member Functions

 ConeEvaluator (std::shared_ptr< EvaluatorParameters > params)
 Constructs a new DeviationValidator object with specified intervals on the deviation.
 
bool evaluateCluster (Cluster &cluster, const GroundGrid &ground_grid)
 Perform the cluster evaluation, guaranteeing they pass all validators.
 

Private Member Functions

bool close_to_ground (Cluster &cluster, const GroundGrid &ground_grid) const
 Check if the cluster is close to the ground.
 
bool cylinder_fits_cone (Cluster &cluster) const
 Check if a cylinder fits the cone dimensions.
 
bool npoints_valid (Cluster &cluster) const
 Check if the number of points in the cluster is valid, according to the distance.
 
 FRIEND_TEST (ConeEvaluatorTest, CloseToGroundTrue)
 
 FRIEND_TEST (ConeEvaluatorTest, CloseToGroundFalse)
 
 FRIEND_TEST (ConeEvaluatorTest, CylinderFitsConeTrue)
 
 FRIEND_TEST (ConeEvaluatorTest, CylinderFitsConeFalse)
 
 FRIEND_TEST (ConeEvaluatorTest, NPointsValidTrue)
 
 FRIEND_TEST (ConeEvaluatorTest, NPointsValidFalse)
 

Private Attributes

std::shared_ptr< EvaluatorParametersparams_
 

Detailed Description

class that evaluates the cluster as a cone or not

Definition at line 17 of file cone_evaluator.hpp.

Constructor & Destructor Documentation

◆ ConeEvaluator()

ConeEvaluator::ConeEvaluator ( std::shared_ptr< EvaluatorParameters params)

Constructs a new DeviationValidator object with specified intervals on the deviation.

Parameters
paramsStruct with all validators, weights and minimum confidence.

Definition at line 3 of file cone_evaluator.cpp.

Member Function Documentation

◆ close_to_ground()

bool ConeEvaluator::close_to_ground ( Cluster cluster,
const GroundGrid ground_grid 
) const
private

Check if the cluster is close to the ground.

Parameters
clusterCluster to evaluate
ground_gridGround grid to use for ground height lookup

Definition at line 5 of file cone_evaluator.cpp.

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

◆ cylinder_fits_cone()

bool ConeEvaluator::cylinder_fits_cone ( Cluster cluster) const
private

Check if a cylinder fits the cone dimensions.

Parameters
clusterCluster to evaluate

Definition at line 37 of file cone_evaluator.cpp.

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

◆ evaluateCluster()

bool ConeEvaluator::evaluateCluster ( Cluster cluster,
const GroundGrid ground_grid 
)

Perform the cluster evaluation, guaranteeing they pass all validators.

Parameters
clusterCluster to evaluate.
ground_gridThe ground grid to use for ground proximity checks.
Returns
True if cluster is a valid cone, false otherwise.

Definition at line 93 of file cone_evaluator.cpp.

Here is the call graph for this function:

◆ FRIEND_TEST() [1/6]

ConeEvaluator::FRIEND_TEST ( ConeEvaluatorTest  ,
CloseToGroundFalse   
)
private

◆ FRIEND_TEST() [2/6]

ConeEvaluator::FRIEND_TEST ( ConeEvaluatorTest  ,
CloseToGroundTrue   
)
private

◆ FRIEND_TEST() [3/6]

ConeEvaluator::FRIEND_TEST ( ConeEvaluatorTest  ,
CylinderFitsConeFalse   
)
private

◆ FRIEND_TEST() [4/6]

ConeEvaluator::FRIEND_TEST ( ConeEvaluatorTest  ,
CylinderFitsConeTrue   
)
private

◆ FRIEND_TEST() [5/6]

ConeEvaluator::FRIEND_TEST ( ConeEvaluatorTest  ,
NPointsValidFalse   
)
private

◆ FRIEND_TEST() [6/6]

ConeEvaluator::FRIEND_TEST ( ConeEvaluatorTest  ,
NPointsValidTrue   
)
private

◆ npoints_valid()

bool ConeEvaluator::npoints_valid ( Cluster cluster) const
private

Check if the number of points in the cluster is valid, according to the distance.

Parameters
clusterCluster to evaluate

Definition at line 79 of file cone_evaluator.cpp.

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

Member Data Documentation

◆ params_

std::shared_ptr<EvaluatorParameters> ConeEvaluator::params_
private

Definition at line 35 of file cone_evaluator.hpp.


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