From d06b0ab63f666c86a708ce7109c003dda5aea66a Mon Sep 17 00:00:00 2001 From: Kevin Daun Date: Thu, 7 Mar 2019 16:43:05 +0100 Subject: [PATCH] Initialize RangeData in NormalEstimation tests. (#1532) Resolving https://github.com/googlecartographer/cartographer/issues/1530 Same as https://github.com/googlecartographer/cartographer/pull/1520 --- .../mapping/internal/2d/normal_estimation_2d_test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cartographer/mapping/internal/2d/normal_estimation_2d_test.cc b/cartographer/mapping/internal/2d/normal_estimation_2d_test.cc index e51ff14..e32dcb4 100644 --- a/cartographer/mapping/internal/2d/normal_estimation_2d_test.cc +++ b/cartographer/mapping/internal/2d/normal_estimation_2d_test.cc @@ -37,7 +37,7 @@ TEST(NormalEstimation2DTest, SinglePoint) { "}"); const proto::NormalEstimationOptions2D options = CreateNormalEstimationOptions2D(parameter_dictionary.get()); - sensor::RangeData range_data; + auto range_data = sensor::RangeData(); const size_t num_angles = 100; range_data.origin.x() = 0.f; range_data.origin.y() = 0.f; @@ -63,7 +63,7 @@ TEST(NormalEstimation2DTest, StraightLineGeometry) { "}"); const proto::NormalEstimationOptions2D options = CreateNormalEstimationOptions2D(parameter_dictionary.get()); - sensor::RangeData range_data; + auto range_data = sensor::RangeData(); range_data.returns.push_back({Eigen::Vector3f{-1.f, 1.f, 0.f}}); range_data.returns.push_back({Eigen::Vector3f{0.f, 1.f, 0.f}}); range_data.returns.push_back({Eigen::Vector3f{1.f, 1.f, 0.f}}); @@ -117,7 +117,7 @@ TEST_P(CircularGeometry2DTest, NumSamplesPerNormal) { "}"); const proto::NormalEstimationOptions2D options = CreateNormalEstimationOptions2D(parameter_dictionary.get()); - sensor::RangeData range_data; + auto range_data = sensor::RangeData(); const size_t num_angles = 100; for (size_t angle_idx = 0; angle_idx < num_angles; ++angle_idx) { const double angle = static_cast(angle_idx) /