23 #include "glog/logging.h" 29 const std::string& sensor_id,
50 oldest_timestamp = std::min(oldest_timestamp, pair.second.time);
58 bool warned_for_dropped_points =
false;
64 auto overlap_begin = ranges.begin();
65 while (overlap_begin < ranges.end() &&
70 auto overlap_end = overlap_begin;
71 while (overlap_end < ranges.end() &&
75 if (ranges.begin() < overlap_begin && !warned_for_dropped_points) {
76 LOG(WARNING) <<
"Dropped " << std::distance(ranges.begin(), overlap_begin)
77 <<
" earlier points.";
78 warned_for_dropped_points =
true;
82 if (overlap_begin < overlap_end) {
83 std::size_t origin_index = result.origins.size();
84 result.origins.push_back(data.
origin);
86 for (
auto overlap_it = overlap_begin; overlap_it != overlap_end;
93 result.ranges.push_back(point);
98 if (overlap_end == ranges.end()) {
100 }
else if (overlap_end == ranges.begin()) {
110 std::sort(result.ranges.begin(), result.ranges.end(),
const std::set< std::string > expected_sensor_ids_
common::Time current_start_
common::Time current_end_
std::map< std::string, sensor::TimedPointCloudData > id_to_pending_data_
UniversalTimeScaleClock::time_point Time
Eigen::Vector4f point_time
Duration FromSeconds(const double seconds)
double ToSeconds(const Duration duration)
std::vector< Eigen::Vector4f > TimedPointCloud
sensor::TimedPointCloudOriginData CropAndMerge()
sensor::TimedPointCloudOriginData AddRangeData(const std::string &sensor_id, const sensor::TimedPointCloudData &timed_point_cloud_data)
sensor::TimedPointCloud ranges