Ask Your Question

Revision history [back]

this is my code and i got this errors :

[pcl::OrganizedMultiPlaneSegmentation::segment] Organized point cloud is required for this plane extraction method! code:

pcl::search::KdTree<pcl::pointxyz>::Ptr kdtree(new pcl::search::KdTree<pcl::pointxyz>); pcl::NormalEstimation<pcl::pointxyz, pcl::normal=""> normalEstimation;

pcl::PointCloud <pcl::normal>::Ptr normals (new pcl::PointCloud <pcl::normal>); normalEstimation.setInputCloud(cloud); normalEstimation.setSearchMethod(kdtree); normalEstimation.setKSearch(3); normalEstimation.compute(*normals);

pcl::OrganizedMultiPlaneSegmentation< pcl::PointXYZ, pcl::Normal, pcl::Label > mps; mps.setMinInliers (10000); mps.setInputNormals(normals); mps.setAngularThreshold (0.017453 * 2.0); mps.setDistanceThreshold (0.02);

std::vector<pcl::planarregion<pcl::pointxyz>,Eigen::aligned_allocator<pcl::planarregion<pcl::pointxyz> > > regions; mps.setInputCloud (cloud); mps.segment(regions);
ROS_INFO_STREAM("the number of regions: " << regions.size ()); is there anyone can help me to solve this problem, i really appreciate that. tanks in advance.