SimOneEvaluationAPI module
- SimOneEvaluationAPI.SoInitEvaluationService(mainVehicleId, serviceIP='127.0.0.1', port=8078, withMainVehicle=True, withObstacleNeeded=True)[源代码]
初始化评价服务
Initialize the Evaluation Service for autonomous driving algorithms.
默认情况下,评价服务将接收判决数据和GPS数据(类别:judge, mainvehicle)
By default, the evaluation service will receive judge data and GPS data (categories: judge, mainvehicle).
- 参数:
mainVehicleId (str) --
主车的ID
Id of the main vehicle.
serviceIP (str) --
评价服务的IP地址
IP address of the evaluation service. Default is "127.0.0.1".
port (int) --
评价服务的端口号
Port number for the evaluation server. Default is 8078.
withMainVehicle (bool) --
是否默认发送主车数据到评价服务器
Whether to send MainVehicle data to the evaluation server by default. Default is True.
withObstacleNeeded (bool) --
是否发送障碍物数据到评价服务器
Whether to send Obstacle data to the evaluation server. Default is True.
- 返回:
执行结果:成功或失败。Execution outcome: success or failure.
- 返回类型:
- SimOneEvaluationAPI.SoInitEvaluationServiceWithLocalData(mainVehicleId, withMainVehicle=True, withObstacleNeeded=True)[源代码]
初始化评价服务,并使用本地存储数据
Initialize the Evaluation Service for autonomous driving algorithms with local data storage.
默认情况下,评价服务将接收判决数据和GPS数据(类别:judge, mainvehicle)
By default, the evaluation service will receive judge data and GPS data (categories: judge, mainvehicle).
- 参数:
mainVehicleId (str) --
主车的ID
Id of the main vehicle.
withMainVehicle (bool) --
是否默认发送主车数据到评价服务器
Whether to send MainVehicle data to the evaluation server by default. Default is True.
withObstacleNeeded (bool) --
是否发送障碍物数据到评价服务器
Whether to send Obstacle data to the evaluation server. Default is True.
- 返回:
执行结果:成功或失败
Execution outcome: success or failure.
- 返回类型:
- SimOneEvaluationAPI.SoAddEvaluationRecord(mainVehicleId, jsonString)[源代码]
添加评价算法所需的各类信息(JSON格式)
Add evaluation records for the Evaluation algorithm in JSON format.
该记录可由json dump生成,包含属性类别、时间戳等信息,例如:{"category": "signal", "timestamp": 1648363819335, "ACC": "on", "ACCSpeed": 20}
The record, which can be generated by json dump, includes property category, timestamp, and other information, e.g., {"category": "signal", "timestamp": 1648363819335, "ACC": "on", "ACCSpeed": 20}.
- SimOneEvaluationAPI.SoSaveEvaluationRecord()[源代码]
保存评价算法所需的各类信息(JSON格式)
Save the evaluation records for the Evaluation algorithm in JSON format.
此函数用于保存之前添加的评价算法记录,格式为JSON
This function is used to save the previously added evaluation records in JSON format.
- 返回:
执行结果:成功或失败
Execution outcome: success or failure.
- 返回类型:
- 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.