Skip to content

Commit

Permalink
fix: added temporary retrocompatibility to old perception data (#7929)
Browse files Browse the repository at this point in the history
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
  • Loading branch information
knzo25 authored Jul 10, 2024
1 parent a39cfb7 commit 6b9f164
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions sensing/pointcloud_preprocessor/src/filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,19 @@ bool pointcloud_preprocessor::Filter::convert_output_costly(std::unique_ptr<Poin
void pointcloud_preprocessor::Filter::faster_input_indices_callback(
const PointCloud2ConstPtr cloud, const PointIndicesConstPtr indices)
{
if (
// TODO(knzo25): This first branch is to give temporary compatibility with old perception data.
// Should be deleted soon
if (utils::is_data_layout_compatible_with_point_xyzi(*cloud)) {
RCLCPP_ERROR_THROTTLE(
get_logger(), *get_clock(), 10000,
"The pointcloud layout is compatible with PointXYZI. You may be using legacy "
"code/data. Continue at your own risk");
} else if (
!utils::is_data_layout_compatible_with_point_xyzircaedt(*cloud) &&
!utils::is_data_layout_compatible_with_point_xyzirc(*cloud)) {
RCLCPP_ERROR(
get_logger(),
"The pointcloud layout is not compatible with PointXYZIRCAEDT not PointXYZIRC. Aborting");
"The pointcloud layout is not compatible with PointXYZIRCAEDT/PointXYZIRC. Aborting");

if (utils::is_data_layout_compatible_with_point_xyziradrt(*cloud)) {
RCLCPP_ERROR(
Expand Down

0 comments on commit 6b9f164

Please sign in to comment.