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; } }