Skip to content

Commit

Permalink
Initialize RangeData in NormalEstimation tests. (cartographer-project…
Browse files Browse the repository at this point in the history
  • Loading branch information
klwkbin authored and pifon2a committed Mar 7, 2019
1 parent a60cca4 commit d06b0ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cartographer/mapping/internal/2d/normal_estimation_2d_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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}});
Expand Down Expand Up @@ -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<double>(angle_idx) /
Expand Down

0 comments on commit d06b0ab

Please sign in to comment.