MessageFilter and PointCloud<PointXYZ> error request for member ‘toSec’

asked 2014-06-11 12:23:05 -0500

mark_vision gravatar image

updated 2014-06-11 12:23:37 -0500

Hi all, I'm converting a package from Groovy to Hydro. I got many compiler errors that were corrected but now the last one is difficult to solve for me. In a point of the program there's

mn_ = new tf::MessageFilter<pcl::PointCloud<pcl::PointXYZ> > (*sub_, tf_, "", 1);

that raise this error:

In file included from /home/mcamurri/hyq-ws/src/robot_self_filter/src/self_filter.cpp:39:0:
/opt/ros/hydro/include/tf/message_filter.h: In member function ‘void tf::MessageFilter<M>::add(const MEvent&) [with M = pcl::PointCloud<pcl::PointXYZ>, tf::MessageFilter<M>::MEvent = ros::MessageEvent<const pcl::PointCloud<pcl::PointXYZ> >]’:
/opt/ros/hydro/include/tf/message_filter.h:458:5:   instantiated from ‘void tf::MessageFilter<M>::incomingMessage(const ros::MessageEvent<const M>&) [with M = pcl::PointCloud<pcl::PointXYZ>]’
/opt/ros/hydro/include/tf/message_filter.h:168:5:   instantiated from ‘void tf::MessageFilter<M>::connectInput(F&) [with F = message_filters::Subscriber<pcl::PointCloud<pcl::PointXYZ> >, M = pcl::PointCloud<pcl::PointXYZ>]’
/opt/ros/hydro/include/tf/message_filter.h:158:5:   instantiated from ‘tf::MessageFilter<M>::MessageFilter(F&, tf::Transformer&, const string&, uint32_t, ros::NodeHandle, ros::Duration) [with F = message_filters::Subscriber<pcl::PointCloud<pcl::PointXYZ> >, M = pcl::PointCloud<pcl::PointXYZ>, std::string = std::basic_string<char>, uint32_t = unsigned int]’
/home/mcamurri/hyq-ws/src/robot_self_filter/src/self_filter.cpp:67:84:   instantiated from here
/opt/ros/hydro/include/tf/message_filter.h:263:9: error: request for member ‘toSec’ in ‘ros::MessageEvent<M>::getMessage() const [with M = const pcl::PointCloud<pcl::PointXYZ>]().boost::shared_ptr<T>::operator-> [with T = const pcl::PointCloud<pcl::PointXYZ>]()->pcl::PointCloud<pcl::PointXYZ>::header.pcl::PCLHeader::stamp’, which is of non-class type ‘const uint64_t {aka const long unsigned int}’
/opt/ros/hydro/include/tf/message_filter.h:458:5:   instantiated from ‘void tf::MessageFilter<M>::incomingMessage(const ros::MessageEvent<const M>&) [with M = pcl::PointCloud<pcl::PointXYZ>]’
/opt/ros/hydro/include/tf/message_filter.h:168:5:   instantiated from ‘void tf::MessageFilter<M>::connectInput(F&) [with F = message_filters::Subscriber<pcl::PointCloud<pcl::PointXYZ> >, M = pcl::PointCloud<pcl::PointXYZ>]’
/opt/ros/hydro/include/tf/message_filter.h:158:5:   instantiated from ‘tf::MessageFilter<M>::MessageFilter(F&, tf::Transformer&, const string&, uint32_t, ros::NodeHandle, ros::Duration) [with F = message_filters::Subscriber<pcl::PointCloud<pcl::PointXYZ> >, M = pcl::PointCloud<pcl::PointXYZ>, std::string = std::basic_string<char>, uint32_t = unsigned int]’
/home/mcamurri/hyq-ws/src/robot_self_filter/src/self_filter.cpp:67:84:   instantiated from here
/opt/ros/hydro/include/tf/message_filter.h:275:5: error: request for member ‘toSec’ in ‘ros::MessageEvent<M>::getMessage() const [with M = const pcl::PointCloud<pcl::PointXYZ>]().boost::shared_ptr<T>::operator-> [with T = const pcl::PointCloud<pcl::PointXYZ>]()->pcl::PointCloud<pcl::PointXYZ>::header.pcl::PCLHeader::stamp’, which is of non-class type ‘const uint64_t {aka const long unsigned int}’
/opt/ros/hydro/include/tf/message_filter.h: In member function ‘bool tf::MessageFilter<M>::testMessage(const MEvent&) [with M = pcl::PointCloud<pcl::PointXYZ>, tf::MessageFilter<M>::MEvent = ros::MessageEvent<const pcl::PointCloud<pcl::PointXYZ> >]’:
/opt/ros/hydro/include/tf/message_filter.h:429:7:   instantiated from ‘void tf::MessageFilter<M>::testMessages() [with ...
(more)
edit retag flag offensive close merge delete