GLIM
Loading...
Searching...
No Matches
time_keeper.hpp
1#pragma once
2
3#include <optional>
4#include <glim/util/raw_points.hpp>
5
6namespace glim {
7
23
28public:
29 TimeKeeper();
31
38 bool process(const glim::RawPoints::Ptr& points);
39
44 bool validate_imu_stamp(const double imu_stamp);
45
46private:
47 void replace_points_stamp(const glim::RawPoints::Ptr& points);
48 double estimate_scan_duration(const double stamp);
49
50private:
51 PerPointTimeSettings settings;
52
53 double last_points_stamp;
54 double last_imu_stamp;
55
56 // Scan duration estimation
57 double estimated_scan_duration;
58 std::vector<double> scan_duration_history;
59
60 double point_time_offset;
61};
62
63} // namespace glim
Utility class to unify timestamp convension.
Definition time_keeper.hpp:27
bool process(const glim::RawPoints::Ptr &points)
Replace frame and point timestamps.
bool validate_imu_stamp(const double imu_stamp)
Check if IMU and LiDAR data are (very roughly) synchronized.
Parameters for per-point timestamp management.
Definition time_keeper.hpp:9
bool relative_time
Definition time_keeper.hpp:15
bool prefer_frame_time
If true, frame timestamp will never be overwritten by antyhing. If false, when per-point timestamps a...
Definition time_keeper.hpp:20
bool autoconf
If true, load parameters from config file.
Definition time_keeper.hpp:14
double point_time_scale
Scale factor to convert per-point timestamps to seconds.
Definition time_keeper.hpp:21