diff --git a/cartographer/mapping_2d/local_trajectory_builder.cc b/cartographer/mapping_2d/local_trajectory_builder.cc index e0760ed..e385db8 100644 --- a/cartographer/mapping_2d/local_trajectory_builder.cc +++ b/cartographer/mapping_2d/local_trajectory_builder.cc @@ -90,7 +90,7 @@ LocalTrajectoryBuilder::AddRangeData(const common::Time time, if (num_accumulated_ == 0) { first_pose_estimate_ = extrapolator_->ExtrapolatePose(time).cast(); accumulated_range_data_ = - sensor::RangeData{Eigen::Vector3f::Zero(), {}, {}}; + sensor::RangeData{range_data.origin, {}, {}}; } // TODO(gaschler): Take time delta of individual points into account. diff --git a/cartographer/mapping_3d/local_trajectory_builder.cc b/cartographer/mapping_3d/local_trajectory_builder.cc index c35f07b..a53223a 100644 --- a/cartographer/mapping_3d/local_trajectory_builder.cc +++ b/cartographer/mapping_3d/local_trajectory_builder.cc @@ -70,7 +70,7 @@ LocalTrajectoryBuilder::AddRangeData(const common::Time time, if (num_accumulated_ == 0) { first_pose_estimate_ = extrapolator_->ExtrapolatePose(time).cast(); accumulated_range_data_ = - sensor::RangeData{Eigen::Vector3f::Zero(), {}, {}}; + sensor::RangeData{range_data.origin, {}, {}}; } // TODO(gaschler): Take time delta of individual points into account.