判定事件 / Judgment Events¶
说明 / Overview
场景判定事件的回调注册与主动发布接口。
Interfaces for registering scenario judgment event callbacks and actively publishing judgment events.
SimOneEvaluationAPI.SoSetJudgeEventCB(cb)
¶
场景判定事件回调
Register the callback function for scenario judgment events.
此函数用于注册场景判定事件的回调函数,用于处理场景中的判定事件
This function is used to register a callback function for scenario judgment events, to handle judgment events within the scenario.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cb
|
function
|
场景判定事件的回调函数 Scenario judgment event callback function. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
执行结果:成功或失败 Execution outcome: success or failure. |
SimOneEvaluationAPI.SoAddJudgeEvent(mainVehicleId, data, terminate=False)
¶
发送场景判定事件
Broadcast scenario judgment event information for report generation.
此函数用于广播场景中的判定事件信息,用于报告生成
This function is used to broadcast judgment event information in a scenario, intended for report generation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mainVehicleId
|
str
|
主车的ID ID of the main vehicle. |
required |
data
|
str
|
场景中的判定事件信息 Judge event information of the scenario. |
required |
terminate
|
bool
|
是否终止场景,默认为False Whether to terminate the scenario, default is False. |
False
|
Returns:
| Type | Description |
|---|---|
bool
|
执行结果:成功或失败 Execution outcome: success or failure. |