From b665fbd6d22945dce8c0d0dcb5a01f3ff0ef5035 Mon Sep 17 00:00:00 2001 From: gaschler Date: Fri, 3 Nov 2017 13:34:53 +0100 Subject: [PATCH] Follow googlecartographer/cartographer#616. (#569) --- cartographer_ros/cartographer_ros/node.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cartographer_ros/cartographer_ros/node.cc b/cartographer_ros/cartographer_ros/node.cc index 55f0ed3..f986a04 100644 --- a/cartographer_ros/cartographer_ros/node.cc +++ b/cartographer_ros/cartographer_ros/node.cc @@ -194,8 +194,8 @@ void Node::PublishTrajectoryStates(const ::ros::WallTimerEvent& timer_event) { // published poses to advance. If we already know a newer pose, we use its // time instead. Since tf knows how to interpolate, providing newer // information is better. - const ::cartographer::common::Time now = - std::max(FromRos(ros::Time::now()), extrapolator.GetLastPoseTime()); + const ::cartographer::common::Time now = std::max( + FromRos(ros::Time::now()), extrapolator.GetLastExtrapolatedTime()); stamped_transform.header.stamp = ToRos(now); const Rigid3d tracking_to_local = extrapolator.ExtrapolatePose(now); const Rigid3d tracking_to_map =