Re: [PCL-users] Segment planes perpendicular to axis Z

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Radu B. Rusu
Date:  
To: Aaron O'Toole <airuno2L@gmail.com>
CC: Point Cloud Library \(PCL\) mailing list
Subject: Re: [PCL-users] Segment planes perpendicular to axis Z
Aaron,

Sure. If I'm not mistaken, r1893 and r1894 are relevant:

http://dev.pointclouds.org/projects/pcl/repository/revisions/1893
http://dev.pointclouds.org/projects/pcl/repository/revisions/1894

Cheers,
Radu.
--
Point Cloud Library (PCL) - http://pointclouds.org

On 07/26/2011 01:58 PM, Aaron O'Toole <> wrote:
> Radu,
>
> Would you mind letting me know which files you changed in response to this?
>
> Thanks,
>
>
> On Tue, Jul 26, 2011 at 4:40 PM, Radu B. Rusu < <mailto:rusu@willowgarage.com>> wrote:
>
>     Ruben,

>
>     I believe I fixed this in trunk and all branches. Can you please give it a try again?

>
>     Thank you in advance.

>
>     Cheers,
>     Radu.
>     --
>     Point Cloud Library (PCL) - http://pointclouds.org

>
>     On 07/22/2011 07:01 AM, Ruben Ares wrote:
>      > I've tried with a point cloud with 100 points, all of them with z=1.
>      >
>      > The next code (with eps angle corrected) doesn't find any plane.

>      >
>      > g.setModelType (pcl::SACMODEL_PERPENDICULAR_PLANE);
>      > seg.setMethodType (pcl::SAC_RANSAC);
>      > seg.setMaxIterations(1000);
>      > seg.setDistanceThreshold (0.1);
>      > seg.setAxis(Eigen::Vector3f(0,0,1));
>      > seg.setEpsAngle (0.1);

>      >
>      > I'm going to create an issue on the tracker.

>      >
>      > Thanks for the help.
>      > > Date: Wed, 20 Jul 2011 14:46:45 -0700
>      > > From:  <mailto:rusu@willowgarage.com>
>      > > To:  <mailto:pcl-users@code.ros.org>
>      > > CC:  <mailto:bladecsp@hotmail.com>
>      > > Subject: Re: [PCL-users] Segment planes perpendicular to axis Z

>      > >
>      > > Ruben,

>      > >

>      > >

>      > >
>      > > On 07/20/2011 02:26 PM, Ruben Ares wrote:
>      > > > Are there any restrictions in the segmentation module about the coordinate system? I'm only need planes
>      > perpendicular to
>      > > > my Z-axis and I don't understad why the coordinate system must be relevant.

>      > >
>      > > Nope, there are no restrictions. Ok, so you want planes perpendicular to your camera's Z. That's easy.

>      > >
>      > > > The scene has that kind of planes but the next code doesn't find any of them.

>      > > >
>      > > > seg.setModelType (pcl::SACMODEL_PERPENDICULAR_PLANE);
>      > > > seg.setMethodType (pcl::SAC_RANSAC);
>      > > > seg.setMaxIterations(1000);
>      > > > seg.setDistanceThreshold (0.05);
>      > > > seg.setAxis(Eigen::Vector3f(0,0,1));
>      > > > seg.setEpsAngle (0);

>      > >
>      > > I think the last call might be the reason for that. You specify an absolute threshold of "0" radians, which
>     means you
>      > > want the plane to be perfect. We seem to have introduced a condition that says that the angle has to be larger
>     than 0
>      > > here (check sac_model_perpendicular_plane.hpp, line 85 in trunk), which could be both a bug and a feature :)
>     (meaning
>      > > that we're flexible with respect to changing this condition).

>      > >
>      > > As far as I remember the reason for this check is that we need a bit of wiggle room for the sample consensus
>     methods in
>      > > terms of getting their samples, otherwise we risk at spending more time in the loop (overconstraining the
>     system). This
>      > > should not affect the end results, meaning that if your plane is perfectly perpendicular you will still get it.
>     The only
>      > > time this assumption would break is if you would have 2 planes within that tolerance threshold with the exact
>     number of
>      > > points, and for some reason you want to differentiate between them.

>      > >
>      > > So basically you need so specify a small tolerance (0.01 radians is good enough if you know for a fact that
>     your plane's
>      > > equation is perfectly perpendicular to Z) in order for this to kick in. I just updated the documentation to
>     point this
>      > > thing. Sorry for not mentioning this earlier.

>      > >
>      > > If you still have problems with this, can you please create an issue on our tracker
>     (http://dev.pointclouds.org) with a
>      > > simple dataset and a minimal code example so we can reproduce the error and try to fix it? Thanks.

>      > >
>      > > Cheers,
>      > > Radu.

>      >

>      >
>      > _______________________________________________
>      >  <mailto:PCL-users@code.ros.org> / http://pointclouds.org
>      > https://code.ros.org/mailman/listinfo/pcl-users
>     _______________________________________________
>      <mailto:PCL-users@code.ros.org> / http://pointclouds.org
>     https://code.ros.org/mailman/listinfo/pcl-users

>
>
>
>
> --
> - Aaron O'Toole

_______________________________________________
/ http://pointclouds.org
https://code.ros.org/mailman/listinfo/pcl-users