Skip to content

Commit

Permalink
fix(hesai): workaround for PCL bug to fix pointcloud size fields when…
Browse files Browse the repository at this point in the history
… filters are enabled

Signed-off-by: Max SCHMELLER <[email protected]>
  • Loading branch information
mojomex committed Nov 26, 2024
1 parent 580e713 commit ee790f0
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,17 @@ class HesaiDecoder : public HesaiScanDecoder
// The driver wrapper converts to degrees, expects radians
point.azimuth = corrected_angle_data.azimuth_rad;
point.elevation = corrected_angle_data.elevation_rad;
for (const auto & filter : sensor_configuration_->point_filters) {
if (filter->excluded(point)) {
pc->points.pop_back();
break;
}

const auto & filters = sensor_configuration_->point_filters;
bool excluded = std::any_of(filters.begin(), filters.end(), [&](const auto & filter) {
return filter->excluded(point);
});

if (excluded) {
continue;
}

pc->emplace_back(point);
}
}
}
Expand Down

0 comments on commit ee790f0

Please sign in to comment.