Skip to content

Commit 6b9f164

Browse files
authored
fix: added temporary retrocompatibility to old perception data (#7929)
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
1 parent a39cfb7 commit 6b9f164

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

sensing/pointcloud_preprocessor/src/filter.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -413,12 +413,19 @@ bool pointcloud_preprocessor::Filter::convert_output_costly(std::unique_ptr<Poin
413413
void pointcloud_preprocessor::Filter::faster_input_indices_callback(
414414
const PointCloud2ConstPtr cloud, const PointIndicesConstPtr indices)
415415
{
416-
if (
416+
// TODO(knzo25): This first branch is to give temporary compatibility with old perception data.
417+
// Should be deleted soon
418+
if (utils::is_data_layout_compatible_with_point_xyzi(*cloud)) {
419+
RCLCPP_ERROR_THROTTLE(
420+
get_logger(), *get_clock(), 10000,
421+
"The pointcloud layout is compatible with PointXYZI. You may be using legacy "
422+
"code/data. Continue at your own risk");
423+
} else if (
417424
!utils::is_data_layout_compatible_with_point_xyzircaedt(*cloud) &&
418425
!utils::is_data_layout_compatible_with_point_xyzirc(*cloud)) {
419426
RCLCPP_ERROR(
420427
get_logger(),
421-
"The pointcloud layout is not compatible with PointXYZIRCAEDT not PointXYZIRC. Aborting");
428+
"The pointcloud layout is not compatible with PointXYZIRCAEDT/PointXYZIRC. Aborting");
422429

423430
if (utils::is_data_layout_compatible_with_point_xyziradrt(*cloud)) {
424431
RCLCPP_ERROR(

0 commit comments

Comments
 (0)