ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

PCL package on ROS Hydro compiling errors

asked 2013-09-25 13:56:13 -0500

v3n0w gravatar image

updated 2013-11-14 10:51:05 -0500

tfoote gravatar image

Hi guys. I have this package that used to run on ROS fuerte. Now I have changed to Hydro and I'm having compilation problems. So, I have a clear full install of ROS Hydro on Mint 15, 32bits.

When I try to compile the package I get some crazy template errors, here they are:

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/caiom/ros_workspace/obstacledetection/src/main.cpp:6:
/opt/ros/hydro/include/ros/message_traits.h: In instantiation of ‘static ros::Time ros::message_traits::TimeStamp<M, typename boost::enable_if<ros::message_traits::HasHeader<M> >::type>::value(const M&) [with M = pcl::PointCloud<pcl::PointXYZRGB>]’:
/opt/ros/hydro/include/message_filters/sync_policies/exact_time.h:126:102:   required from ‘void message_filters::sync_policies::ExactTime<M0, M1, M2, M3, M4, M5, M6, M7, M8>::add(const typename boost::mpl::at_c<typename message_filters::PolicyBase<M0, M1, M2, M3, M4, M5, M6, M7, M8>::Events, i>::type&) [with int i = 1; M0 = sensor_msgs::Image_<std::allocator<void> >; M1 = pcl::PointCloud<pcl::PointXYZRGB>; M2 = message_filters::NullType; M3 = message_filters::NullType; M4 = message_filters::NullType; M5 = message_filters::NullType; M6 = message_filters::NullType; M7 = message_filters::NullType; M8 = message_filters::NullType; typename boost::mpl::at_c<typename message_filters::PolicyBase<M0, M1, M2, M3, M4, M5, M6, M7, M8>::Events, i>::type = ros::MessageEvent<const pcl::PointCloud<pcl::PointXYZRGB> >]’
/opt/ros/hydro/include/message_filters/synchronizer.h:358:5:   required from ‘void message_filters::Synchronizer<Policy>::cb(const typename boost::mpl::at_c<typename Policy::Events, i>::type&) [with int i = 1; Policy = message_filters::sync_policies::ExactTime<sensor_msgs::Image_<std::allocator<void> >, pcl::PointCloud<pcl::PointXYZRGB>, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType>; typename boost::mpl::at_c<typename Policy::Events, i>::type = ros::MessageEvent<const pcl::PointCloud<pcl::PointXYZRGB> >]’
/opt/ros/hydro/include/message_filters/synchronizer.h:291:5:   required from ‘void message_filters::Synchronizer<Policy>::connectInput(F0&, F1&, F2&, F3&, F4&, F5&, F6&, F7&, F8&) [with F0 = message_filters::Subscriber<sensor_msgs::Image_<std::allocator<void> > >; F1 = message_filters::Subscriber<pcl::PointCloud<pcl::PointXYZRGB> >; F2 = message_filters::NullFilter<message_filters::NullType>; F3 = message_filters::NullFilter<message_filters::NullType>; F4 = message_filters::NullFilter<message_filters::NullType>; F5 = message_filters::NullFilter<message_filters::NullType>; F6 = message_filters::NullFilter<message_filters::NullType>; F7 = message_filters::NullFilter<message_filters::NullType>; F8 = message_filters::NullFilter<message_filters::NullType>; Policy = message_filters::sync_policies::ExactTime<sensor_msgs::Image_<std::allocator<void> >, pcl::PointCloud<pcl::PointXYZRGB>, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType>]’
  /opt/ros/hydro/include/message_filters/synchronizer.h:282:5:   required from ‘void message_filters::Synchronizer<Policy>::connectInput(F0&, F1&, F2&, F3&, F4&, F5&, F6&, F7&) [with F0 = message_filters::Subscriber<sensor_msgs::Image_<std::allocator<void> > >; F1 = message_filters::Subscriber<pcl::PointCloud<pcl::PointXYZRGB> >; F2 = message_filters::NullFilter<message_filters::NullType>; F3 = message_filters::NullFilter<message_filters::NullType>; F4 = message_filters::NullFilter<message_filters::NullType>; F5 = message_filters::NullFilter<message_filters::NullType>; F6 = message_filters::NullFilter<message_filters::NullType>; F7 = message_filters::NullFilter<message_filters::NullType>; Policy = message_filters::sync_policies::ExactTime<sensor_msgs::Image_<std::allocator ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
4

answered 2013-09-25 16:07:21 -0500

That´s some extensive output you have there ;) Searching for "error" gives only one hit though, and that is:

error: could not convert ‘m.pcl::PointCloud<pcl::PointXYZRGB>::header.pcl::PCLHeader::stamp’ from ‘const uint64_t {aka const long long unsigned int}’ to ‘ros::Time’

This is related to header information of PCL pointclouds not using a header with ros::Time anymore, so a conversion function has to be used as described here.

edit flag offensive delete link more

Comments

Unfortunately this would need to be changed in /opt/ros/hydro/include/ros/message_traits.h:219:56, wouldn't it?

Felix Endres gravatar image Felix Endres  ( 2013-12-13 03:49:06 -0500 )edit
0

answered 2018-12-05 13:41:07 -0500

GPrathap gravatar image

Here how I was able to fix the timestamp,

#include <pcl_conversions/pcl_conversions.h>
...
pcl_conversions::toPCL(ros::Time::now(), point_cloud_msg->header.stamp);

More information can be found here: https://answers.ros.org/question/1727... and http://wiki.ros.org/hydro/Migration#PCL

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-09-25 13:56:13 -0500

Seen: 1,067 times

Last updated: Dec 05 '18