EvaluationAPI¶
EvaluationAPI Overview¶
Evaluation API Features¶
SimOne supports user-defined evaluation. EvaluationAPI is used to collect and store the data required for evaluation, covering two main categories:
- Simulation process data: Pose data of the Ego Vehicle and obstacles, etc. (automatically collected by SimOne)
- Algorithm internal signals: State machine signals, control signals, etc. (reported by the user via
AddEvaluationRecord)
Initialization: Database Storage vs. Local File Storage¶
InitEvaluationService |
InitEvaluationServiceWithLocalData |
|
|---|---|---|
| Storage | Evaluation service database | Local JSON file |
| Use case | Online evaluation reports, integration with SimOne evaluation platform | Offline analysis, no evaluation service available |
| Extra parameters | Requires serviceIP and port |
No network configuration needed |
Call only one of the two initialization functions — they cannot be used simultaneously.
Reporting Algorithm Internal Signals¶
Use AddEvaluationRecord to report custom signals in JSON format, for example:
{"category": "signal", "timestamp": 1648363819335, "ACC": "on", "ACCSpeed": 20}
The category field identifies the data category, timestamp is a millisecond-precision Unix timestamp, and all other fields are user-defined. Call SaveEvaluationRecord to trigger local persistence.
Scenario Judgment Interface¶
The judgment interface is used to receive or actively send scenario judgment events during simulation, integrating with the SimOne evaluation report system.
| Use Case | API |
|---|---|
| Passive receive: register a callback to receive scenario judgment events generated by SimOne | SetJudgeEventCB |
| Active send: broadcast a judgment event to the evaluation service (for report generation) | AddJudgeEvent |
When the terminate parameter of AddJudgeEvent is set to true, the current scenario is terminated at the same time the event is sent.
For complete API signatures, parameter descriptions, and the
SimOne_Data_JudgeEventstruct definition, see: -InitEvaluationService-InitEvaluationServiceWithLocalData-SetJudgeEventCB-AddJudgeEvent