This forum has been archived. All content is frozen. Please use KDE Discuss instead.

running PCL tutorial using Eigen3

Tags: None
(comma "," separated)
aerobot
Registered Member
Posts
3
Karma
0
OS

running PCL tutorial using Eigen3

Tue Jan 17, 2012 9:46 pm
Hi,

I am running Mac OS X 10.7, using XCode 4.2.1 and am trying to get one of the Point Cloud Library (PCL) visualization tutorials running on my machine. I am getting the following error from the point_cloud.h file concerning Eigen::Map:

In file included from /Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/pcl_base.h:56:
In file included from /Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/common/common.h:41:
In file included from /Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/common/common_headers.h:39:
In file included from /Users/aerobot/Development/PointCloudTest/PointCloudTest/main.cpp:12:
/Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/point_cloud.h:320:16:{320:16-320:165}: error: no viable conversion from 'Eigen::Map<Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> >' to 'const Eigen::Map<const Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> >' [3]
return (Eigen::Map<Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> >((float*)(&points[0])+offset, points.size (), dim, Eigen::OuterStride<> (stride)));


I have not found any answers on the PCL mailing list so I thought I might try here.

Thanks for your help.
aerobot
Registered Member
Posts
3
Karma
0
OS
PCL compiles just fine using the Eigen headers under LLVM GCC 4.2 in XCode 4.2.1. It will not compile under CLang (Apple LLVM compiler 3.0). The problem seems to be that there is no header for:

const Eigen::Map<const Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> >

but there is for:

Eigen::Map<Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> >
jitseniesen
Registered Member
Posts
204
Karma
2
aerobot wrote:I am running Mac OS X 10.7, using XCode 4.2.1 and am trying to get one of the Point Cloud Library (PCL) visualization tutorials running on my machine. I am getting the following error from the point_cloud.h file concerning Eigen::Map:

In file included from /Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/pcl_base.h:56:
In file included from /Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/common/common.h:41:
In file included from /Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/common/common_headers.h:39:
In file included from /Users/aerobot/Development/PointCloudTest/PointCloudTest/main.cpp:12:
/Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/point_cloud.h:320:16:{320:16-320:165}: error: no viable conversion from 'Eigen::Map<Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> >' to 'const Eigen::Map<const Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> >' [3]
return (Eigen::Map<Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> >((float*)(&points[0])+offset, points.size (), dim, Eigen::OuterStride<> (stride)));


Is the quoted line of code ("return (Eigen::Map<Eigen::MatrixXf, ...") part of PCL? It seems to me the error message is saying that it should be "return (Eigen::Map<const Eigen::MatrixXf, ...". Does making that change help?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
yes, the error is clearly in pcl-1.4/pcl/point_cloud.h, feel free to report to PCL guys.
aerobot
Registered Member
Posts
3
Karma
0
OS

Re: running PCL tutorial using Eigen3

Thu Jan 19, 2012 12:15 am
jitseniesen wrote:
aerobot wrote:I am running Mac OS X 10.7, using XCode 4.2.1 and am trying to get one of the Point Cloud Library (PCL) visualization tutorials running on my machine. I am getting the following error from the point_cloud.h file concerning Eigen::Map:

In file included from /Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/pcl_base.h:56:
In file included from /Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/common/common.h:41:
In file included from /Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/common/common_headers.h:39:
In file included from /Users/aerobot/Development/PointCloudTest/PointCloudTest/main.cpp:12:
/Developer/SDKs/MacOSX10.7.sdk/usr/local/include/pcl-1.4/pcl/point_cloud.h:320:16:{320:16-320:165}: error: no viable conversion from 'Eigen::Map<Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> >' to 'const Eigen::Map<const Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> >' [3]
return (Eigen::Map<Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> >((float*)(&points[0])+offset, points.size (), dim, Eigen::OuterStride<> (stride)));


Is the quoted line of code ("return (Eigen::Map<Eigen::MatrixXf, ...") part of PCL? It seems to me the error message is saying that it should be "return (Eigen::Map<const Eigen::MatrixXf, ...". Does making that change help?


Yes, I've made this change on my machine and it makes everything compile just fine. Thanks for you help jitseniesen.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]