Adds 'offset_seconds' to PointCloudWithIntensities. (#571)
This is preparing using per-point-unwarping in the `assets_writer` in `cartographer_ros`. Related to googlecartographer/cartographer_ros#521. PAIR=@wohemaster
parent
2862e12506
commit
6708930bbf
|
@ -36,8 +36,8 @@ struct PointsBatch {
|
||||||
trajectory_id = 0;
|
trajectory_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Time at which this batch has been acquired.
|
// Time at which the first point of this batch has been acquired.
|
||||||
common::Time time;
|
common::Time start_time;
|
||||||
|
|
||||||
// Origin of the data, i.e. the location of the sensor in the world at
|
// Origin of the data, i.e. the location of the sensor in the world at
|
||||||
// 'time'.
|
// 'time'.
|
||||||
|
@ -50,7 +50,7 @@ struct PointsBatch {
|
||||||
// Trajectory ID that produced this point.
|
// Trajectory ID that produced this point.
|
||||||
int trajectory_id;
|
int trajectory_id;
|
||||||
|
|
||||||
// Geometry of the points in a metric frame.
|
// Geometry of the points in the map frame.
|
||||||
std::vector<Eigen::Vector3f> points;
|
std::vector<Eigen::Vector3f> points;
|
||||||
|
|
||||||
// Intensities are optional and may be unspecified. The meaning of these
|
// Intensities are optional and may be unspecified. The meaning of these
|
||||||
|
|
|
@ -216,7 +216,7 @@ void XRayPointsProcessor::Process(std::unique_ptr<PointsBatch> batch) {
|
||||||
Insert(*batch, &aggregations_[0]);
|
Insert(*batch, &aggregations_[0]);
|
||||||
} else {
|
} else {
|
||||||
for (size_t i = 0; i < floors_.size(); ++i) {
|
for (size_t i = 0; i < floors_.size(); ++i) {
|
||||||
if (!ContainedIn(batch->time, floors_[i].timespans)) {
|
if (!ContainedIn(batch->start_time, floors_[i].timespans)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Insert(*batch, &aggregations_[i]);
|
Insert(*batch, &aggregations_[i]);
|
||||||
|
|
|
@ -32,6 +32,11 @@ typedef std::vector<Eigen::Vector3f> PointCloud;
|
||||||
struct PointCloudWithIntensities {
|
struct PointCloudWithIntensities {
|
||||||
PointCloud points;
|
PointCloud points;
|
||||||
std::vector<float> intensities;
|
std::vector<float> intensities;
|
||||||
|
|
||||||
|
// For each item in 'points', contains the time delta of when it was acquired
|
||||||
|
// after points[0], i.e. the first entry is always 0.f. If timing
|
||||||
|
// information is not available all entries will be 0.f.
|
||||||
|
std::vector<float> offset_seconds;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Transforms 'point_cloud' according to 'transform'.
|
// Transforms 'point_cloud' according to 'transform'.
|
||||||
|
|
Loading…
Reference in New Issue