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
Members
- AddKpi
- AddKpi
- Evaluate
- GetKpiMessage
- GtBaseEvaluator
- Init
- Reset
- SetInput
- ~GtBaseEvaluator
- ~IEvaluator
Public functions
Function GtBaseEvaluator
Function ~GtBaseEvaluator
Function Init
Function Reset
Function Evaluate
Function AddKpi
- kpi: The iKpi interface
- std::unique_ptr< core::kpi::IKpi< osi3::GroundTruth > > kpi
Function GetKpiMessage
Function SetInput
- ground_truth: The osi groundtruth type in protobuf
- const osi3::GroundTruth & ground_truth