22 #include "Eigen/Geometry" 24 #include "glog/logging.h" 30 const mapping::proto::Trajectory& trajectory) {
31 for (
const mapping::proto::Trajectory::Node& node : trajectory.node()) {
40 CHECK_GE(time,
latest_time()) <<
"New transform is older than latest.";
54 CHECK(
Has(time)) <<
"Missing transform for: " <<
time;
55 const auto end = std::lower_bound(
59 return timestamped_transform.time <
time;
61 if (end->time == time) {
62 return end->transform;
64 const auto start = std::prev(end);
69 CHECK(!
empty()) <<
"Empty buffer.";
74 CHECK(!
empty()) <<
"Empty buffer.";
UniversalTimeScaleClock::time_point Time
Time FromUniversal(const int64 ticks)