[ros-users] PCL segmentation and Eigen
Radu Bogdan Rusu
rusu at willowgarage.com
Fri Jul 30 18:32:38 UTC 2010
Sanja,
I just tried your code and it works fine for me. Can you please send me the dataset that you're trying it on? We can
take this offline.
Thanks,
Radu.
On 07/30/2010 10:12 AM, Sanja Popovic wrote:
> #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 [rusu at willowgarage.com]
> Sent: Friday, July 30, 2010 1:07 PM
> To: ros-users at code.ros.org
> 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
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>
> --
> | Radu Bogdan Rusu | http://rbrusu.com/
--
| Radu Bogdan Rusu | http://rbrusu.com/
More information about the ros-users
mailing list