error compiling PCL ROS Tutorial [closed]
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&, pcl::PointCloud<pcl::pointxyz>&)’
/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&, pcl::PointCloud<pointt>&)
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&) [with M = pcl::ModelCoefficients]’:
/opt/ros/hydro/include/ros/message_traits.h:255:104: instantiated from ‘const char* ros::message_traits::md5sum(const M&) [with M = pcl::ModelCoefficients]’
/opt/ros/hydro/include/ros/publisher.h:112:7: instantiated from ‘void ros::Publisher::publish(const M&) 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&) [with M = pcl::ModelCoefficients]’:
/opt/ros/hydro/include/ros/message_traits.h:264:106: instantiated from ‘const char* ros::message_traits::datatype(const M&) [with M = pcl::ModelCoefficients]’
/opt/ros/hydro/include/ros/publisher.h:112:7: instantiated from ‘void ros::Publisher::publish(const M&) 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 ...
The first part of the tutorial worked fine?
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.