MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / TEST

Function TEST

grid_map_pcl/test/PointcloudProcessorTest.cpp:21–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19namespace grid_map_pcl_test {
20
21TEST(PointcloudProcessorTest, ExtractClusters) {
22 grid_map_pcl_test::setVerbosityLevel(ros::console::levels::Warn);
23 const auto seed = rand();
24 grid_map_pcl_test::rndGenerator.seed(seed);
25
26 const unsigned int numTests = 10;
27 for (unsigned int i = 0; i < numTests; ++i) {
28 double minZ, stdDevZ;
29 int nBlobs;
30 auto cloud = grid_map_pcl_test::PointcloudCreator::createNBlobsAboveEachOther(&minZ, &stdDevZ, &nBlobs);
31 grid_map::grid_map_pcl::PointcloudProcessor pointcloudProcessor;
32 pointcloudProcessor.loadParameters(grid_map_pcl_test::getConfigFilePath());
33 auto clusters = pointcloudProcessor.extractClusterCloudsFromPointcloud(cloud);
34 EXPECT_EQ(clusters.size(), nBlobs);
35 }
36
37 if (::testing::Test::HasFailure()) {
38 std::cout << "\n Test ExtractClusters failed with seed: " << seed << std::endl;
39 }
40}
41
42} /*namespace grid_map_pcl_test */
43} // namespace grid_map

Callers

nothing calls this directly

Calls 4

setVerbosityLevelFunction · 0.85
getConfigFilePathFunction · 0.85
loadParametersMethod · 0.45

Tested by

no test coverage detected