Skip to content

Commit 7c0c855

Browse files
committed
Add filter to VLP32 and VLS128
1 parent cb04f79 commit 7c0c855

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

nebula_decoders/src/nebula_decoders_velodyne/decoders/vlp32_decoder.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ void Vlp32Decoder::unpack(const velodyne_msgs::msg::VelodynePacket & velodyne_pa
300300
current_point.return_type = static_cast<uint8_t>(return_type);
301301
current_point.channel = corrections.laser_ring;
302302
current_point.azimuth = rotation_radians_[block.rotation];
303+
304+
if (check_invalid_point(corrections.laser_ring, block.rotation)) continue;
305+
303306
current_point.elevation = sin_vert_angle;
304307
auto point_ts = block_timestamp - scan_timestamp_ + point_time_offset;
305308
if (point_ts < 0)

nebula_decoders/src/nebula_decoders_velodyne/decoders/vls128_decoder.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ void Vls128Decoder::unpack(const velodyne_msgs::msg::VelodynePacket & velodyne_p
294294
current_point.return_type = return_type;
295295
current_point.channel = corrections.laser_ring;
296296
current_point.azimuth = rotation_radians_[azimuth_corrected];
297+
298+
if (check_invalid_point(corrections.laser_ring, azimuth_corrected)) continue;
299+
297300
current_point.elevation = sin_vert_angle;
298301
current_point.distance = distance;
299302
auto point_ts = block_timestamp - scan_timestamp_ + point_time_offset;

0 commit comments

Comments
 (0)