障碍物感知 Obstacle Perception¶
GetGroundTruth¶
bool GetGroundTruth(const char *mainVehicleId, SimOne_Data_Obstacle *pObstacle)
得到仿真场景中的物体的真值.
Get Ground Truth Data of Objects(Obstacles) from simulation scene.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
mainVehicleId |
const char * |
主车的ID Id of the main vehicle |
pObstacle |
SimOne_Data_Obstacle * |
物体真值消息 Obstacle data |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果成功获取感知物数据,则返回true,否则返回false Returns true if the obstacle data is successfully retrieved, false otherwise |
SetGroundTruthUpdateCB¶
bool SetGroundTruthUpdateCB(void(*cb)(const char *mainVehicleId, SimOne_Data_Obstacle *pObstacle))
注册仿真场景中物体真值的更新回调.
Register callback function of applying for objects' ground truth.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
cb |
void(*)(const char *mainVehicleId, SimOne_Data_Obstacle *pObstacle) |
获取仿真场景中物体真值的更新回调 Obstacle ground truth data update callback function |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise. |
GetSensorDetections¶
bool GetSensorDetections(const char *mainVehicleId, const char *sensorId, SimOne_Data_SensorDetections *pGroundtruth)
获取传感器检测到物体的对应真值,支持的传感器包括目标级相机、目标级激光雷达、完美传感器.
Retrieve Ground Truth Corresponding to Objects Detected by Sensors, including Object-Based Cameras, Object-Based LiDAR, and Perfect Sensors.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
mainVehicleId |
const char * |
主车的ID Id of the main vehicle |
sensorId |
const char * |
目标级传感器ID Sensor Index |
pGroundtruth |
SimOne_Data_SensorDetections * |
目标级传感器感知消息 Object based sensor detections |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果成功获取感知物数据,则返回true,否则返回false Returns true if the obstacle data is successfully retrieved, false otherwise |
SetSensorDetectionsUpdateCB¶
bool SetSensorDetectionsUpdateCB(void(*cb)(const char *mainVehicleId, const char *sensorId, SimOne_Data_SensorDetections *pGroundtruth))
传感器真值信息更新回调,支持的传感器包括目标级相机、目标级激光雷达、完美传感器.
Registering Callback for Sensor Ground Truth Information Updates, supporting sensors such as Object-Based Cameras, Object-Based LiDAR, and Perfect Sensors.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
cb |
void(*)(const char *mainVehicleId, const char *sensorId, SimOne_Data_SensorDetections *pGroundtruth) |
获取仿真场景中目标级传感器真值的更新回调 Object based sensor detection data update callback function |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise. |