Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
kosuke55 committed Dec 4, 2021
1 parent 6e71be8 commit 0a23458
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions grid_map_pcl/test/GridMapPclLoaderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,10 @@ TEST(GridMapPclLoaderTest, CalculateElevation) // NOLINT
gridMapPclLoader.loadParameters(grid_map_pcl_test::getConfigFilePath());
gridMapPclLoader.setInputCloud(cloud);

// 0: Smallest value among the average values ​​of each cluster
const int height_type = 0;
std::vector<float> clusterHeights;
gridMapPclLoader.calculateElevationFromPointsInsideGridMapCell(cloud, clusterHeights);
const float elevation = *std::min_element(clusterHeights.begin(), clusterHeights.end());
const float elevation = gridMapPclLoader.calculateElevationFromPointsInsideGridMapCell(cloud, height_type, clusterHeights);
EXPECT_NEAR(elevation, minZ, 3 * stdDevZ);
}

Expand Down

0 comments on commit 0a23458

Please sign in to comment.