diff --git a/wpb_home_behaviors/src/wpb_home_grab_server.cpp b/wpb_home_behaviors/src/wpb_home_grab_server.cpp index cfe78a1..5746816 100644 --- a/wpb_home_behaviors/src/wpb_home_grab_server.cpp +++ b/wpb_home_behaviors/src/wpb_home_grab_server.cpp @@ -209,6 +209,9 @@ void ProcCloudCB(const sensor_msgs::PointCloud2 &input) segmentation.setMethodType(pcl::SAC_RANSAC); segmentation.setDistanceThreshold(0.005); 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); segmentation.segment(*planeIndices, *coefficients); //ROS_INFO_STREAM("Num_Of_Planes = " << planeIndices->indices.size());