update grab_server

This commit is contained in:
Robot 2019-10-22 09:11:13 +08:00
parent 0a014fb0d0
commit 77a3c3a045

View File

@ -209,6 +209,9 @@ void ProcCloudCB(const sensor_msgs::PointCloud2 &input)
segmentation.setMethodType(pcl::SAC_RANSAC); segmentation.setMethodType(pcl::SAC_RANSAC);
segmentation.setDistanceThreshold(0.005); segmentation.setDistanceThreshold(0.005);
segmentation.setOptimizeCoefficients(true); segmentation.setOptimizeCoefficients(true);
Eigen::Vector3f axis = Eigen::Vector3f(0.0,1.0,0.0);
segmentation.setAxis(axis);
segmentation.setEpsAngle( 10.0f * (M_PI/180.0f) );
pcl::PointIndices::Ptr planeIndices(new pcl::PointIndices); pcl::PointIndices::Ptr planeIndices(new pcl::PointIndices);
segmentation.segment(*planeIndices, *coefficients); segmentation.segment(*planeIndices, *coefficients);
//ROS_INFO_STREAM("Num_Of_Planes = " << planeIndices->indices.size()); //ROS_INFO_STREAM("Num_Of_Planes = " << planeIndices->indices.size());