状态查询 / State Query¶
说明 / Overview
注册并获取超出标准 GPS 范围的主车扩展状态信息(如悬架、轮胎等)。
Interfaces for registering and retrieving extended ego vehicle state information beyond standard GPS (e.g., suspension, tire data).
SimOnePNCAPI.SoRegisterVehicleState(mainVehicleId, data, size)
¶
注册主车状态信息(超出SimOne_Data_Gps范围)
Register additional vehicle state information beyond what is included in SimOne_Data_Gps.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mainVehicleId
|
str
|
车辆ID |
required |
Returns:
| Type | Description |
|---|---|
bool
Example:
.. code-block:: python
states = [ESimOne_Data_Vehicle_State.SPEED]
SoRegisterVehicleState("MainVehicle", states, len(states))
|
执行结果:成功或失败 |
SimOnePNCAPI.SoGetVehicleState(mainVehicleId, data)
¶
获取通过SoRegisterVehicleState注册的主车状态信息
Retrieve vehicle states registered with SoRegisterVehicleState.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mainVehicleId
|
str
|
车辆ID |
required |
data
|
SimOne_Data_Vehicle_Extra
|
主车动态状态信息 Example: .. code-block:: python
|
required |