@@ -117,9 +117,9 @@ PointCloud2Iterators prepareMessageAndCreateIterators(sensor_msgs::PointCloud2&
117
117
else if (fill_fields_up_to_stage == RANGE_IMAGE_GENERATION)
118
118
up_to_field = 15 ;
119
119
else if (fill_fields_up_to_stage == GROUND_POINT_SEGMENTATION)
120
- up_to_field = 18 ;
120
+ up_to_field = 19 ;
121
121
else if (fill_fields_up_to_stage == CONTINUOUS_CLUSTERING)
122
- up_to_field = 25 ;
122
+ up_to_field = 26 ;
123
123
124
124
// Some point fields below should be actually UINT64. Unfortunately, this type is not available for a PointCloud2
125
125
// message: http://docs.ros.org/en/melodic/api/sensor_msgs/html/msg/PointField.html. Therefore, we use FLOAT64 which
@@ -181,6 +181,9 @@ PointCloud2Iterators prepareMessageAndCreateIterators(sensor_msgs::PointCloud2&
181
181
" height_over_ground" ,
182
182
1 ,
183
183
sensor_msgs::PointField::FLOAT32,
184
+ " ignore_for_clustering" ,
185
+ 1 ,
186
+ sensor_msgs::PointField::UINT8,
184
187
" finished_at_continuous_azimuth_angle" ,
185
188
1 ,
186
189
sensor_msgs::PointField::FLOAT64,
@@ -226,6 +229,7 @@ PointCloud2Iterators prepareMessageAndCreateIterators(sensor_msgs::PointCloud2&
226
229
iterators.iter_gp_label_out = {msg, " ground_point_label" };
227
230
iterators.iter_dbg_gp_label_out = {msg, " debug_ground_point_label" };
228
231
iterators.iter_height_over_ground_out = {msg, " height_over_ground" };
232
+ iterators.iter_ignore_for_clustering_out = {msg, " ignore_for_clustering" };
229
233
if (fill_fields_up_to_stage == GROUND_POINT_SEGMENTATION)
230
234
return iterators;
231
235
iterators.iter_finished_at_azimuth_angle = {msg, " finished_at_continuous_azimuth_angle" };
@@ -278,6 +282,7 @@ void addPointToMessage(PointCloud2Iterators& container,
278
282
*(*container.iter_gp_label_out + data_index_message) = point.ground_point_label ;
279
283
*(*container.iter_dbg_gp_label_out + data_index_message) = point.debug_ground_point_label ;
280
284
*(*container.iter_height_over_ground_out + data_index_message) = point.height_over_ground ;
285
+ *(*container.iter_ignore_for_clustering_out + data_index_message) = point.is_ignored ? BLUE : ORANGE;
281
286
if (fill_fields_up_to_stage == GROUND_POINT_SEGMENTATION)
282
287
return ;
283
288
0 commit comments