12 #include <gtest/gtest.h>
15 const double map2_x_off,
const double map2_tim_off,
16 const size_t expected_m1_count,
const size_t expected_m2_count)
18 const double pts1[8][3] = {
19 {1, 0, 0}, {1.03, 0, 0}, {1, 1, 0}, {1.01, 1.02, 0},
20 {0, 1, 0}, {-0.01, 1.01, 0}, {-1, 0, 0}, {-1.01, 0.02, 0}};
29 for (
size_t i = 0; i <
sizeof(pts1) /
sizeof(pts1[0]); i++)
30 map1.
insertPoint(pts1[i][0], pts1[i][1], pts1[i][2]);
31 for (
size_t i = 0; i <
sizeof(pts1) /
sizeof(pts1[0]); i++)
35 pts1[i][0], pts1[i][1], pts1[i][2],
x,
y,
z);
37 if (i == 1)
x += map2_x_off;
43 std::vector<bool> deletion_mask;
46 pc_filter.
filter(&map1, pts1_tim, pts1_pose, &extra_params);
47 EXPECT_EQ(map1.
size(), expected_m1_count);
49 pc_filter.
filter(&map2, pts2_tim, pts2_pose, &extra_params);
50 EXPECT_EQ(map2.
size(), expected_m2_count);
53 TEST(CPointCloudFilterByDistance, noOutliers)
59 TEST(CPointCloudFilterByDistance, withOutliers)
65 TEST(CPointCloudFilterByDistance, tooOldMap)