交通灯 & 环境 / Traffic Lights & Environment¶
说明 / Overview
获取当前交通灯状态,以及读取 / 设置仿真环境(天气、时间、光照)的接口。
Interfaces for retrieving traffic light states and reading/setting the simulation environment (weather, time, lighting).
SimOneSensorAPI.SoGetTrafficLights(mainVehicleId, opendriveLightId, trafficLight)
¶
获取仿真场景中的交通灯真值
Get traffic light(s) info from simulation scene
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
mainVehicleId
|
string
|
车辆ID |
必需 |
opendriveLightId
|
int
|
交通灯的OpenDrive ID |
必需 |
trafficLight
|
SimOne_Data_TrafficLight
|
交通灯信息 |
必需 |
返回:
| 类型 | 描述 |
|---|---|
bool
|
executive outcome: success/faile |
SimOneSensorAPI.SoGetEnvironment(pEnvironment)
¶
获取当前环境相关信息: 天气/光照/地面
Get current environment info
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
pEnvironment
|
SimOne_Data_Environment
|
当前环境信息 |
必需 |
返回:
| 类型 | 描述 |
|---|---|
bool
|
executive outcome: success/faile |
SimOneSensorAPI.SoSetEnvironment(pEnvironment)
¶
设置当前环境相关信息: 天气/光照/地面
Set current environment info
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
pEnvironment
|
SimOne_Data_Environment
|
待设置的环境信息 |
必需 |
返回:
| 类型 | 描述 |
|---|---|
bool
|
executive outcome: success/faile |