跳转至

障碍物感知 / Obstacle Perception

说明 / Overview

获取仿真场景中障碍物真值及目标级检测结果的接口。
Interfaces for retrieving ground truth obstacle data and target-level detection results in the simulation scene.

两种接口的区别 / Difference Between the Two Interfaces

  • SoGetGroundTruth 返回所有障碍物的完整真值(位置、尺寸、速度等)
    Returns complete ground truth for all obstacles (position, size, velocity, etc.)
  • SoGetSensorDetections 返回挂载传感器视野内的目标检测结果,更贴近真实传感器输出
    Returns detection results within the sensor's field of view, closer to real sensor output

SimOneSensorAPI.SoGetGroundTruth(mainVehicleId, obstacleData)

获取仿真场景中障碍物真值

Get Ground Truth Data of Objects(Obstacles) from simulation scene

参数:

名称 类型 描述 默认
mainVehicleId string

车辆ID
vehicle id

必需
obstacleData SimOne_Data_Obstacle

障碍物真值信息
obstacle(s) ground truth info

必需

返回:

类型 描述
bool

executive outcome: success/faile

SimOneSensorAPI.SoApiSetGroundTruthUpdateCB(cb)

获取仿真场景中障碍物真值更新回调

Register the callback func applying for obstacle info

参数:

名称 类型 描述 默认
cb ground truth callback function mainVehicleId (str): vehicle id Data_Obstacle (SimOne_Data_Obstacle): ground true info

回调函数,格式:cb(mainVehicleId, Data_Obstacle)
cb(mainVehicleId, Data_Obstacle)

必需

SimOneSensorAPI.SoGetSensorDetections(mainVehicleId, sensorId, sensorDetections)

获取传感器检测的障碍物真值

Get ground truth objects info by sensor(s) camera/lidar/perfect perception sensors

参数:

名称 类型 描述 默认
mainVehicleId string

车辆ID
vehicle id

必需
sensorId string

传感器ID
sensor Id

必需
sensorDetections SimOne_Data_SensorDetections

传感器检测到的障碍物信息
sensor detected obstacles(s) info

必需

返回:

类型 描述
bool

executive outcome: success/faile

SimOneSensorAPI.SoApiSetSensorDetectionsUpdateCB(cb)

传感器真值信息更新回调

Register the callback func applying for ground truth info by sensor(s) camera/lidar/perfect perception sensors

参数:

名称 类型 描述 默认
cb sensor detections callback function mainVehicleId (str): vehicle id sensorId(str): sensor id Data_Groundtruth(SimOne_Data_SensorDetections): sensor detected obstacle(s) info

回调函数,格式:cb(mainVehicleId, sensorId, Data_Groundtruth)
cb(mainVehicleId, sensorId, Data_Groundtruth)

必需