diff --git a/localization/ndt_scan_matcher/src/util_func.cpp b/localization/ndt_scan_matcher/src/util_func.cpp index 237b85ad75e10..d570778fbe3b5 100644 --- a/localization/ndt_scan_matcher/src/util_func.cpp +++ b/localization/ndt_scan_matcher/src/util_func.cpp @@ -129,7 +129,7 @@ void get_nearest_timestamp_pose( const rclcpp::Time pose_time_stamp = output_new_pose_cov_msg_ptr->header.stamp; if (pose_time_stamp > time_stamp) { // TODO(Tier IV): refactor - if (pose_time_stamp.seconds() == 0.0) { + if (output_old_pose_cov_msg_ptr->header.stamp.sec == 0.0) { output_old_pose_cov_msg_ptr = output_new_pose_cov_msg_ptr; } break;