[ros-users] Set orientation of plane for SACSegmentation

sabrinakliegl at innok.de sabrinakliegl at innok.de
Mon Sep 20 13:47:45 UTC 2010


Ok, just my fault. When I epsAngle is not 0, I can see the effect of  
given axis.

Sabrina

Zitat von sabrinakliegl at innok.de:

>
> Hi everybody,
>
> I am trying to extract the ground plane from a point cloud using pcl
> and SACSegmentation. I implemented the segmentation similar to the
> code of the "Planar model segmentation"-tutorial for pcl.
>
> This works great to extract the dominant plane of the point cloud. Now
> I want to specify the axis and the epsAngle to avoid that e.g. walls
> are recognized as dominant planes.
>
> Here the relevant code:
>
> void getDominantPlane(const pcl::PointCloud<pcl::PointXYZ>& cloud){
> pcl::ModelCoefficients coefficients;
> pcl::PointIndices inliers;
>
> pcl::SACSegmentation<pcl::PointXYZ> seg;
> seg.setOptimizeCoefficients (true);
> seg.setModelType (pcl::SACMODEL_ORIENTED_PLANE);
> seg.setMethodType (pcl::SAC_RANSAC);
> seg.setDistanceThreshold (distanceThres);
>
> seg.setAxis(Eigen::Vector3f(axisX,axisY,axisZ));
> seg.setEpsAngle( epsAngle/180.0*3.14 );
>
> seg.setInputCloud (boost::make_shared<pcl::PointCloud<pcl::PointXYZ>
>  >(cloud));
> seg.segment (inliers, coefficients);
>
> ...
> }
>
> AxisX, axisY, axisZ and epsAngle are set with dynamic_reconfigure. But
> changing these parameters has no effect to the result of the
> segmentation. What am I doing wrong?
>
> Thanks in advance,
> Sabrina
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>







More information about the ros-users mailing list