Skip to content

Commit

Permalink
fix(ndt_scan_matcher): check with old_pose_time_stamp
Browse files Browse the repository at this point in the history
Signed-off-by: melike tanrikulu <melike@leodrive.ai>
  • Loading branch information
meliketanrikulu committed Jan 17, 2023
1 parent d8558e4 commit a14cd78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion localization/ndt_scan_matcher/src/util_func.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ 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 (output_old_pose_cov_msg_ptr->header.stamp.sec == 0.0) {
const rclcpp::Time old_pose_time_stamp = output_old_pose_cov_msg_ptr->header.stamp;
if (old_pose_time_stamp.seconds() == 0.0) {
output_old_pose_cov_msg_ptr = output_new_pose_cov_msg_ptr;
}
break;
Expand Down

0 comments on commit a14cd78

Please sign in to comment.