Re: [ros-users] PCL segmentation and Eigen

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Sanja Popovic
Date:  
To: Radu Bogdan Rusu
CC: ros-users@code.ros.org
Subject: Re: [ros-users] PCL segmentation and Eigen
#define EIGEN_DONT_ALIGN 1

....
#include <Eigen/Core>
....

void findPlane(pcl::PointCloud<pcl::PointXYZ> cloud, pcl::PointIndices &inliers) {
    Eigen::Vector3f v = Eigen::Vector3f(1.0, 0.0, 0.0);
    pcl::ModelCoefficients coefficients;
    pcl::SACSegmentation<pcl::PointXYZ> seg;
    seg.setModelType (pcl::SACMODEL_ORIENTED_PLANE);
    seg.setAxis(v);
    seg.setEpsAngle(30.0);
    seg.setMethodType (pcl::SAC_RANSAC);
    seg.setDistanceThreshold (0.02);
    seg.setInputCloud (boost::make_shared<pcl::PointCloud<pcl::PointXYZ> >(cloud));
    seg.segment (inliers, coefficients);
}


We figured out that it is most likely that you just need to follow the instructions from here: http://eigen.tuxfamily.org/dox/StructHavingEigenMembers.html but you are the boss :)

Thanks,
Sanja
________________________________________
From: Radu Bogdan Rusu []
Sent: Friday, July 30, 2010 1:07 PM
To:
Cc: Sanja Popovic
Subject: Re: [ros-users] PCL segmentation and Eigen

Sanja,

Can you please send me a snippet of code that exhibits that? I'd like to fix this immediately if it's a bug.

Thanks,
Radu.

On 07/30/2010 10:06 AM, Sanja Popovic wrote:
> Hi,
>
> When I used PCL segmentation of oriented planes, I had to use Eigen::Vector3f to specify the axis. This led to an error described here: http://eigen.tuxfamily.org/dox/UnalignedArrayAssert.html. The fix was to add #define EIGEN_DONT_ALIGN to the very beginning of my code so it also affects the PCL code. Maybe someone should take a look at it because the code broke down when the segment function from SACSegmentation was called.
>
> Thanks,
> Sanja
> _______________________________________________
> ros-users mailing list
>
> https://code.ros.org/mailman/listinfo/ros-users


--
| Radu Bogdan Rusu | http://rbrusu.com/