Skip to content

Commit

Permalink
Add filter to VLP32 and VLS128
Browse files Browse the repository at this point in the history
  • Loading branch information
mebasoglu committed Sep 1, 2023
1 parent cb04f79 commit 7c0c855
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ void Vlp32Decoder::unpack(const velodyne_msgs::msg::VelodynePacket & velodyne_pa
current_point.return_type = static_cast<uint8_t>(return_type);
current_point.channel = corrections.laser_ring;
current_point.azimuth = rotation_radians_[block.rotation];

if (check_invalid_point(corrections.laser_ring, block.rotation)) continue;

current_point.elevation = sin_vert_angle;
auto point_ts = block_timestamp - scan_timestamp_ + point_time_offset;
if (point_ts < 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ void Vls128Decoder::unpack(const velodyne_msgs::msg::VelodynePacket & velodyne_p
current_point.return_type = return_type;
current_point.channel = corrections.laser_ring;
current_point.azimuth = rotation_radians_[azimuth_corrected];

if (check_invalid_point(corrections.laser_ring, azimuth_corrected)) continue;

current_point.elevation = sin_vert_angle;
current_point.distance = distance;
auto point_ts = block_timestamp - scan_timestamp_ + point_time_offset;
Expand Down

0 comments on commit 7c0c855

Please sign in to comment.