Fix the origin of accumulated range data. (#613)

This changes the origin of accumulated range data from the
zero vector (which could be far off) to the origin of the
first range data in the accumulation.
master
Wolfgang Hess 2017-10-30 11:32:06 +01:00 committed by GitHub
parent 82a4b2f171
commit c011177bfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ LocalTrajectoryBuilder::AddRangeData(const common::Time time,
if (num_accumulated_ == 0) {
first_pose_estimate_ = extrapolator_->ExtrapolatePose(time).cast<float>();
accumulated_range_data_ =
sensor::RangeData{Eigen::Vector3f::Zero(), {}, {}};
sensor::RangeData{range_data.origin, {}, {}};
}
// TODO(gaschler): Take time delta of individual points into account.

View File

@ -70,7 +70,7 @@ LocalTrajectoryBuilder::AddRangeData(const common::Time time,
if (num_accumulated_ == 0) {
first_pose_estimate_ = extrapolator_->ExtrapolatePose(time).cast<float>();
accumulated_range_data_ =
sensor::RangeData{Eigen::Vector3f::Zero(), {}, {}};
sensor::RangeData{range_data.origin, {}, {}};
}
// TODO(gaschler): Take time delta of individual points into account.