Skip to main content
Definition: autonomy/evaluator/gt_base_evaluator/gt_base_evaluator.h (line 133) This is the implementation of IEvaluator interface and provides users ability to evaluate KPIs that are added by themselves. This class controls all KPIs centrally and fill/reset the KpiMessage accordingly based on each KPI’s calculation result. To join the simulation, the evaluator must be injected into an Activity and required KPIs need to be added using AddKpi(std::unique_ptr<core::kpi::IKpi<osi3::GroundTruth>> kpi). Example of creating one customized KpiEvaluatorActivity containing 2 KPIs and publish the KpiMessage into KpiLoggerTopic to have the KPI results in output json
Inherits from:

Members

Public functions

Function GtBaseEvaluator

Return type:

Function ~GtBaseEvaluator

Return type:

Function Init

Initial all KPIs (call all kpi->Init();) which are added in this evaluator Return type: void Reimplements: Init

Function Reset

Clear KpiMessage and reset all KPIs (call all kpi->Reset();) which are added in this evaluator Return type: void Reimplements: Reset

Function Evaluate

Calculate all KPIs (call all kpi->CalculateKpi(gt);) which are added in this evaluator and fill the KpiMessage Return type: void Reimplements: Evaluate

Function AddKpi

Add one KPI into this evaluator Parameters:
  • kpi: The iKpi interface
Parameters: Return type: void

Function GetKpiMessage

Get the filled KPI messages based on calculation of all KPIs Returns: A kpi::KpiMessage object, the vector of KpiContent represents of all added KPIs into this evaluator Return type: core::kpi::KpiMessage Reimplements: GetKpiMessage

Function SetInput

Set GroundTruth message for KPI calculations Parameters:
  • ground_truth: The osi groundtruth type in protobuf
Parameters:
  • const osi3::GroundTruth & ground_truth
Return type: void Reimplements: SetInput