From 9fef37bb6835844e8e816281e922379123c7840c Mon Sep 17 00:00:00 2001 From: vividf Date: Thu, 27 Jun 2024 21:28:38 +0900 Subject: [PATCH] fix: fix bug in previous code Signed-off-by: vividf --- .../src/distortion_corrector/distortion_corrector.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp b/sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp index 75e52b175cb83..a21261f1f0a1b 100644 --- a/sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp +++ b/sensing/pointcloud_preprocessor/src/distortion_corrector/distortion_corrector.cpp @@ -37,8 +37,9 @@ void DistortionCorrector::processTwistMessage( rclcpp::Time(twist_queue_.front().header.stamp) < rclcpp::Time(twist_msg->header.stamp) - rclcpp::Duration::from_seconds(1.0)) { twist_queue_.pop_front(); + } else { + break; } - break; } } @@ -109,8 +110,9 @@ void DistortionCorrector::enqueueIMU( rclcpp::Time(angular_velocity_queue_.front().header.stamp) < rclcpp::Time(imu_msg->header.stamp) - rclcpp::Duration::from_seconds(1.0)) { angular_velocity_queue_.pop_front(); + } else { + break; } - break; } }