跳转至

主车信息 / Ego Vehicle Information

说明 / Overview

获取主车列表、主车状态及高精地图数据的接口。
Interfaces for retrieving the ego vehicle list, ego vehicle state, and HD map data.

SimOneServiceAPI.SoGetMainVehicleList(data)

获取主车信息列表

Retrieve the list of main vehicle information.

此函数用于获取SimOne环境中所有主车的信息列表,包括车辆的ID、数量、类型等

This function is used to retrieve a list of information for all main vehicles in the SimOne environment, including vehicle ID, number, type, etc.

参数:

名称 类型 描述 默认
data SimOne_Data_MainVehicle_Info

用于存储主车信息的数据结构

The data structure used to store main vehicle information.

必需

返回:

类型 描述
bool

执行结果:成功或失败

Execution outcome: success or failure.

SimOneServiceAPI.SoGetMainVehicleStatus(mainVehicleId, data)

获取指定主车的状态信息

Retrieve the status information of the specified main vehicle.

参数:

名称 类型 描述 默认
mainVehicleId str

主车的唯一标识符

The unique identifier of the main vehicle.

必需
data SimOne_Data_MainVehicle_Status

用于接收主车状态信息的数据结构

Data structure to receive the main vehicle's status information.

必需

返回:

类型 描述
bool

获取状态信息的执行结果,成功或失败

Execution outcome of retrieving the status information, success or failure.

SimOneServiceAPI.SoAPISetMainVehicleStatusUpdateCB(cb)

注册用于获取主车状态更新的回调函数

Register a callback function for receiving updates on the main vehicle's status.

参数:

名称 类型 描述 默认
cb func

用于接收主车状态更新的回调函数

Callback function that will be invoked with updates on the main vehicle's status.

必需

返回:

类型 描述
bool

注册回调函数的执行结果,成功或失败

Execution outcome of registering the callback function, success or failure.

SimOneServiceAPI.SoGetHDMapData(hdMap)

获取高精度地图元数据信息

Retrieve high-precision map metadata information.

参数:

名称 类型 描述 默认
hdMap SimOne_Data_Map

高精度地图的查询数据

Query data for high-precision map retrieval.

必需

返回:

类型 描述
bool

获取高精度地图数据的执行结果,成功或失败

Execution outcome of retrieving high-precision map data, success or failure.