34 #include <gtest/gtest.h> 38 TEST(ChunkedKdtree, RadiusSearch)
40 pcl::PointCloud<pcl::PointXYZ> pc;
41 pc.push_back(pcl::PointXYZ(0.5, 0.5, 0.5));
42 pc.push_back(pcl::PointXYZ(0.8, 0.0, 0.0));
43 pc.push_back(pcl::PointXYZ(1.3, 0.0, 0.0));
44 pc.push_back(pcl::PointXYZ(0.0, 0.2, 0.0));
45 pc.push_back(pcl::PointXYZ(0.0, -0.3, 0.0));
51 std::vector<float> dist;
54 pcl::PointXYZ(0.5, 0.5, 0.5),
56 ASSERT_EQ(
id.size(), 1u);
60 pcl::PointXYZ(0.5, 0.4, 0.5),
62 ASSERT_EQ(
id.size(), 1u);
66 pcl::PointXYZ(1.05, 0.0, 0.0),
68 ASSERT_EQ(
id.size(), 1u);
72 pcl::PointXYZ(1.1, 0.0, 0.0),
74 ASSERT_EQ(
id.size(), 1u);
78 pcl::PointXYZ(0.0, -0.05, 0.0),
80 ASSERT_EQ(
id.size(), 1u);
84 pcl::PointXYZ(0.0, -0.15, 0.0),
86 ASSERT_EQ(
id.size(), 1u);
90 int main(
int argc,
char** argv)
92 testing::InitGoogleTest(&argc, argv);
94 return RUN_ALL_TESTS();
void setInputCloud(const typename pcl::PointCloud< POINT_TYPE >::ConstPtr &cloud)
TEST(ChunkedKdtree, RadiusSearch)
int radiusSearch(const POINT_TYPE &p, const float &radius, std::vector< int > &id, std::vector< float > &dist_sq, const size_t &num)
int main(int argc, char **argv)