error compiling PCL ROS Tutorial [closed]

asked 2014-01-27 22:11:42 -0600

mark_vision gravatar image

updated 2014-04-20 14:09:34 -0600

ngrennan gravatar image

Hi all, i tried the tutorial here

wiki.ros.org/pcl/Tutorials#pcl.2BAC8-PointCloud.3CT.3E

but I get several compiling errors.

My system is: Ubuntu 12.04 with Hydro installed by sudo apt-get install ros-hydro-desktop-full as explained here

wiki.ros.org/hydro/Installation/Ubuntu

there are no other libraries installed. The code is the same used here

wiki.ros.org/pcl/Tutorials?action=AttachFile&do=view&target=example_planarsegmentation.cpp

with the modifications for hydro explained here

wiki.ros.org/pcl/Tutorials#line-1-30

UPDATE: I've corrected something and now the catkin_make output is:

[ 42%] Built target pgrlibdcstereo
[ 57%] Built target shmem_client_triclops
[ 71%] [ 85%] Built target example2
Building CXX object pcl_tutorial/CMakeFiles/example.dir/src/example.cpp.o
[100%] Built target shmem_server_triclops
/home/mcamurri/hyq-ws/src/pcl_tutorial/src/example.cpp: In function ‘void cloud_cb(const PCLPointCloud2ConstPtr&)’:
/home/mcamurri/hyq-ws/src/pcl_tutorial/src/example.cpp:17:34: error: no matching function for call to ‘fromROSMsg(const pcl::PCLPointCloud2&amp;, pcl::PointCloud<pcl::pointxyz>&amp;)’
/home/mcamurri/hyq-ws/src/pcl_tutorial/src/example.cpp:17:34: note: candidate is:
/opt/ros/hydro/include/pcl_conversions/pcl_conversions.h:486:8: note: template<class t=""> void pcl::fromROSMsg(const PointCloud2&amp;, pcl::PointCloud<pointt>&amp;)
In file included from /opt/ros/hydro/include/ros/serialization.h:37:0,
                 from /opt/ros/hydro/include/ros/publisher.h:34,
                 from /opt/ros/hydro/include/ros/node_handle.h:32,
                 from /opt/ros/hydro/include/ros/ros.h:45,
                 from /home/mcamurri/hyq-ws/src/pcl_tutorial/src/example.cpp:1:
/opt/ros/hydro/include/ros/message_traits.h: In static member function ‘static const char* ros::message_traits::MD5Sum<m>::value(const M&amp;) [with M = pcl::ModelCoefficients]’:
/opt/ros/hydro/include/ros/message_traits.h:255:104:   instantiated from ‘const char* ros::message_traits::md5sum(const M&amp;) [with M = pcl::ModelCoefficients]’
/opt/ros/hydro/include/ros/publisher.h:112:7:   instantiated from ‘void ros::Publisher::publish(const M&amp;) const [with M = pcl::ModelCoefficients]’
/home/mcamurri/hyq-ws/src/pcl_tutorial/src/example.cpp:35:29:   instantiated from here
/opt/ros/hydro/include/ros/message_traits.h:126:34: error: ‘const struct pcl::ModelCoefficients’ has no member named ‘__getMD5Sum’
/opt/ros/hydro/include/ros/message_traits.h: In static member function ‘static const char* ros::message_traits::DataType<m>::value(const M&amp;) [with M = pcl::ModelCoefficients]’:
/opt/ros/hydro/include/ros/message_traits.h:264:106:   instantiated from ‘const char* ros::message_traits::datatype(const M&amp;) [with M = pcl::ModelCoefficients]’
/opt/ros/hydro/include/ros/publisher.h:112:7:   instantiated from ‘void ros::Publisher::publish(const M&amp;) const [with M = pcl::ModelCoefficients]’
/home/mcamurri/hyq-ws/src/pcl_tutorial/src/example.cpp:35:29:   instantiated from here
/opt/ros/hydro/include/ros/message_traits.h:143:36: error: ‘const struct pcl::ModelCoefficients’ has no member named ‘__getDataType’
In file included from /opt/ros/hydro/include/ros/publisher.h:34:0,
                 from /opt/ros/hydro/include/ros/node_handle.h:32,
                 from /opt/ros/hydro/include/ros/ros.h:45,
                 from /home/mcamurri/hyq-ws/src/pcl_tutorial/src/example.cpp:1:
/opt ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason PCL Question: The PCL community prefers to answer questions at http://www.pcl-users.org/ by tfoote
close date 2015-03-09 17:14:23.048029

Comments

The first part of the tutorial worked fine?

lfelipesv gravatar imagelfelipesv ( 2014-01-28 00:06:17 -0600 )edit

Yes the first one works. I corrected some errors on the second one but still doesn't work. I posted the code on the edit. If I try with the old sensor_msgs::PointCloud2 everywhere it shoots other compile errors.

mark_vision gravatar imagemark_vision ( 2014-01-29 23:42:25 -0600 )edit