Skip to content

Commit

Permalink
fix(ndt_scan_matcher): check first old_pose_msg for initialization (a…
Browse files Browse the repository at this point in the history
…utowarefoundation#2660)

* fix(ndt_scan_matcher): check first old_pose_msg  for initialization

Signed-off-by: melike tanrikulu <melike@leodrive.ai>

* fix(ndt_scan_matcher): check with old_pose_time_stamp

Signed-off-by: melike tanrikulu <melike@leodrive.ai>

Signed-off-by: melike tanrikulu <melike@leodrive.ai>
  • Loading branch information
meliketanrikulu authored and badai-nguyen committed Mar 22, 2023
1 parent 2f85a20 commit 608ec3a
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 (pose_time_stamp.seconds() == 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 608ec3a

Please sign in to comment.