From 5a3bb14083e255af7b3917bf6d453c7de9361087 Mon Sep 17 00:00:00 2001 From: gaschler Date: Fri, 3 Nov 2017 11:56:31 +0100 Subject: [PATCH] PoseExtrapolator::GetLastExtrapolatedTime (#626) This prepares the API for #623 and #616. --- cartographer/mapping/pose_extrapolator.cc | 4 ++++ cartographer/mapping/pose_extrapolator.h | 1 + 2 files changed, 5 insertions(+) diff --git a/cartographer/mapping/pose_extrapolator.cc b/cartographer/mapping/pose_extrapolator.cc index e510d2f..8f919a8 100644 --- a/cartographer/mapping/pose_extrapolator.cc +++ b/cartographer/mapping/pose_extrapolator.cc @@ -56,6 +56,10 @@ common::Time PoseExtrapolator::GetLastPoseTime() const { return timed_pose_queue_.back().time; } +common::Time PoseExtrapolator::GetLastExtrapolatedTime() const { + return GetLastPoseTime(); +} + void PoseExtrapolator::AddPose(const common::Time time, const transform::Rigid3d& pose) { if (imu_tracker_ == nullptr) { diff --git a/cartographer/mapping/pose_extrapolator.h b/cartographer/mapping/pose_extrapolator.h index 66976e1..585f10c 100644 --- a/cartographer/mapping/pose_extrapolator.h +++ b/cartographer/mapping/pose_extrapolator.h @@ -47,6 +47,7 @@ class PoseExtrapolator { // Returns the time of the last added pose or Time::min() if no pose was added // yet. common::Time GetLastPoseTime() const; + common::Time GetLastExtrapolatedTime() const; void AddPose(common::Time time, const transform::Rigid3d& pose); void AddImuData(const sensor::ImuData& imu_data);