33 pcl::PointCloud<pcl::PointXYZI> cloud;
34 cloud.points.push_back(pcl::PointXYZI{0.3, 0.3, 0.5, 0});
35 const pcl::PointCloud<pcl::PointXYZI>::Ptr cloud_ptr(
38 Cluster cylinderPointCloud(cloud_ptr);
40 std::vector<double> result = validator.
coneValidator(&cylinderPointCloud, plane);
44 ASSERT_NEAR(result[0], 1.0, 1e-6);
45 ASSERT_NEAR(result[1], 1.0, 1e-6);
46 ASSERT_DOUBLE_EQ(result[2], 1.0);
55 pcl::PointCloud<pcl::PointXYZI> cloud;
56 cloud.points.push_back(pcl::PointXYZI{0.6, 0.6, 1.2, 0});
57 cloud.points.push_back(pcl::PointXYZI{0.3, 0.3, 0.5, 0});
58 const pcl::PointCloud<pcl::PointXYZI>::Ptr cloud_ptr(
61 Cluster cylinderPointCloud(cloud_ptr);
65 std::vector<double> result = validator.
coneValidator(&cylinderPointCloud, plane);
70 ASSERT_NEAR(result[0], 1.0, 1e-6);
71 ASSERT_NEAR(result[1], 1.0, 1e-6);
72 ASSERT_DOUBLE_EQ(result[2], 1.0);
81 pcl::PointCloud<pcl::PointXYZI> cloud;
82 cloud.points.push_back(pcl::PointXYZI{1.0, 1.0, 2.0, 0});
83 cloud.points.push_back(pcl::PointXYZI{20.0, 20.0, 20.0, 0});
84 cloud.points.push_back(pcl::PointXYZI{0.3, 0.3, 0.5, 0});
85 const pcl::PointCloud<pcl::PointXYZI>::Ptr cloud_ptr(
88 Cluster cylinderPointCloud(cloud_ptr);
90 std::vector<double> result = validator.
coneValidator(&cylinderPointCloud, plane);
95 ASSERT_NEAR(result[0], 0.0, 1e-6);
96 ASSERT_NEAR(result[1], 0.0, 1e-6);
97 ASSERT_LT(result[2], 1.0);
106 pcl::PointCloud<pcl::PointXYZI> cloud;
107 cloud.points.push_back(pcl::PointXYZI{1.0, 1.0, 2.0, 0});
108 cloud.points.push_back(pcl::PointXYZI{0.6, 0.6, 0.9, 0});
109 cloud.points.push_back(pcl::PointXYZI{0.3, 0.3, 0.5, 0});
110 const pcl::PointCloud<pcl::PointXYZI>::Ptr cloud_ptr(
113 Cluster cylinderPointCloud(cloud_ptr);
115 std::vector<double> result = validator.
coneValidator(&cylinderPointCloud, plane);
120 ASSERT_EQ(result[0], 0.0);
121 ASSERT_GE(result[1], 0.5);
122 ASSERT_LE(result[1], 1.0);
123 ASSERT_LT(result[2], 1.0);