跳转至

判定事件 / 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.

参数:

名称 类型 描述 默认
cb function

场景判定事件的回调函数

Scenario judgment event callback function.

必需

返回:

类型 描述
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.

参数:

名称 类型 描述 默认
mainVehicleId str

主车的ID

ID of the main vehicle.

必需
data str

场景中的判定事件信息

Judge event information of the scenario.

必需
terminate bool

是否终止场景,默认为False

Whether to terminate the scenario, default is False.

False

返回:

类型 描述
bool

执行结果:成功或失败

Execution outcome: success or failure.