@@ -322,7 +322,7 @@ sensor_msgs::PointCloud2Ptr evaluationToPointCloud(const std::vector<KittiSegmen
322
322
msg->is_dense = false ;
323
323
324
324
sensor_msgs::PointCloud2Modifier output_modifier (*msg);
325
- output_modifier.setPointCloud2Fields (8 ,
325
+ output_modifier.setPointCloud2Fields (10 ,
326
326
" x" ,
327
327
1 ,
328
328
sensor_msgs::PointField::FLOAT32,
@@ -332,6 +332,12 @@ sensor_msgs::PointCloud2Ptr evaluationToPointCloud(const std::vector<KittiSegmen
332
332
" z" ,
333
333
1 ,
334
334
sensor_msgs::PointField::FLOAT32,
335
+ " semantic_label" ,
336
+ 1 ,
337
+ sensor_msgs::PointField::UINT16,
338
+ " instance_label" ,
339
+ 1 ,
340
+ sensor_msgs::PointField::UINT16,
335
341
" has_corresponding_point_in_detection_point_cloud" ,
336
342
1 ,
337
343
sensor_msgs::PointField::UINT8,
@@ -351,6 +357,8 @@ sensor_msgs::PointCloud2Ptr evaluationToPointCloud(const std::vector<KittiSegmen
351
357
sensor_msgs::PointCloud2Iterator<float > iter_x_out (*msg, " x" );
352
358
sensor_msgs::PointCloud2Iterator<float > iter_y_out (*msg, " y" );
353
359
sensor_msgs::PointCloud2Iterator<float > iter_z_out (*msg, " z" );
360
+ sensor_msgs::PointCloud2Iterator<uint16_t > iter_semantic_label_out (*msg, " semantic_label" );
361
+ sensor_msgs::PointCloud2Iterator<uint16_t > iter_instance_label_out (*msg, " instance_label" );
354
362
sensor_msgs::PointCloud2Iterator<uint8_t > iter_has_corresponding_point_in_detection_point_cloud_out (
355
363
*msg, " has_corresponding_point_in_detection_point_cloud" );
356
364
sensor_msgs::PointCloud2Iterator<uint32_t > iter_gpe_out (*msg, " ground_point_evaluation" );
@@ -374,6 +382,8 @@ sensor_msgs::PointCloud2Ptr evaluationToPointCloud(const std::vector<KittiSegmen
374
382
*(iter_x_out + i) = p.point .x ;
375
383
*(iter_y_out + i) = p.point .y ;
376
384
*(iter_z_out + i) = p.point .z ;
385
+ *(iter_semantic_label_out + i) = p.point .semantic_label ;
386
+ *(iter_instance_label_out + i) = p.point .instance_label ;
377
387
*(iter_has_corresponding_point_in_detection_point_cloud_out + i) =
378
388
p.has_corresponding_point_in_detection_point_cloud ? WHITE : RED;
379
389
*(iter_gpe_out + i) = ground_point_evaluation_color;
0 commit comments