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.

返回类型:

bool

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.

返回类型:

bool

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}.

参数:
  • mainVehicleId (str) --

    主车的ID

    Id of the main vehicle.

  • jsonString (str) --

    以JSON格式表示的记录字符串

    Record string in JSON format.

返回:

执行结果:成功或失败

Execution outcome: success or failure.

返回类型:

bool

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.

返回类型:

bool

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.

  • mainVehicleId (str) --

    主车的ID

    Id of the main vehicle.

  • judgeEventDetailInfo (str) --

    场景判定事件的详细信息

    Detail info for scenario judgment event.

返回:

执行结果:成功或失败

Execution outcome: success or failure.

返回类型:

bool

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.

返回:

执行结果:成功或失败

Execution outcome: success or failure.

返回类型:

bool