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

message_filters-related issue

asked 2011-12-22 08:32:10 -0500

alfa_80 gravatar image

updated 2014-01-28 17:11:02 -0500

ngrennan gravatar image

I was following a tutorial on message_filters in order to subscribe to 2 different topics of different type and later use it in a callback function. However, I got a weird long error message as follow:

In file included from /usr/include/boost/bind.hpp:22,
                 from /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/publisher.h:35,
                 from /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:32,
                 from /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include/ros/ros.h:45,
                 from /home/shah/code/ros_workspace/point_cloud_drone/src/pointcloud_builder_node.cpp:1:
/usr/include/boost/bind/bind.hpp: In member function ‘void boost::_bi::list3<A1, A2, A3>::operator()(boost::_bi::type<void>, F&, A&, int) [with F = boost::_mfi::mf2<void, PointCloudBuilder, const geometry_msgs::PoseStampedConstPtr&, const geometry_msgs::Pose2DConstPtr&>, A = boost::_bi::list9<const boost::shared_ptr<const geometry_msgs::PoseStamped_<std::allocator<void> > >&, const boost::shared_ptr<const geometry_msgs::Pose2D_<std::allocator<void> > >&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&>, A1 = boost::arg<1>, A2 = boost::arg<2>, A3 = boost::_bi::value<PointCloudBuilder*>]’:
/usr/include/boost/bind/bind_template.hpp:305:   instantiated from ‘typename boost::_bi::result_traits<R, F>::type boost::_bi::bind_t<R, F, L>::operator()(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&) [with A1 = boost::shared_ptr<const geometry_msgs::PoseStamped_<std::allocator<void> > >, A2 = boost::shared_ptr<const geometry_msgs::Pose2D_<std::allocator<void> > >, A3 = boost::shared_ptr<const message_filters::NullType>, A4 = boost::shared_ptr<const message_filters::NullType>, A5 = boost::shared_ptr<const message_filters::NullType>, A6 = boost::shared_ptr<const message_filters::NullType>, A7 = boost::shared_ptr<const message_filters::NullType>, A8 = boost::shared_ptr<const message_filters::NullType>, A9 = boost::shared_ptr<const message_filters::NullType>, R = void, F = boost::_mfi::mf2<void, PointCloudBuilder, const geometry_msgs::PoseStampedConstPtr&, const geometry_msgs::Pose2DConstPtr&>, L = boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<PointCloudBuilder*> >]’
/usr/include/boost/bind/bind.hpp:820:   instantiated from ‘void boost::_bi::list9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::operator()(boost::_bi::type<void>, F&, A&, int) [with F = boost::_bi::bind_t<void, boost::_mfi::mf2<void, PointCloudBuilder, const geometry_msgs::PoseStampedConstPtr&, const geometry_msgs::Pose2DConstPtr&>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<PointCloudBuilder*> > >, A = boost::_bi::list9<const boost::shared_ptr<const geometry_msgs::PoseStamped_<std::allocator<void> > >&, const boost::shared_ptr<const geometry_msgs::Pose2D_<std::allocator<void> > >&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&, const boost::shared_ptr<const message_filters::NullType>&>, A1 = boost::arg<1>, A2 = boost::arg<2>, A3 = boost::arg<3>, A4 = boost::arg<4>, A5 = boost::arg<5>, A6 = boost::arg<6>, A7 = boost::arg<7>, A8 = boost::arg<8>, A9 = boost ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2011-12-25 12:40:22 -0500

dornhege gravatar image

I'm not sure, but maybe the this should be the 2nd and not the last parameter to bind.

edit flag offensive delete link more

Comments

Yes, I think you're right too, I've put *this* pointer the second argument, but, it's still not working.
alfa_80 gravatar image alfa_80  ( 2011-12-25 19:36:45 -0500 )edit
First, you might try to simple edit the sample code with your message types to confirm the callback is called. There is one thing to note: AFAIK the Timesynchronizer needs exact timestamp matches, not approximate ones.
dornhege gravatar image dornhege  ( 2011-12-26 12:10:33 -0500 )edit
What do you mean by "edit the sample code with your message types"? I've used the sample code with my message types already as shown in the above code snippet, or I misunderstood something?
alfa_80 gravatar image alfa_80  ( 2011-12-26 16:42:33 -0500 )edit
You modified more and built that into your program. If you solely use the sample program everything should be alright there and you can check if it works with your data.
dornhege gravatar image dornhege  ( 2011-12-27 02:45:16 -0500 )edit
I got your point. The only thing I need is that running an image publisher, which I don't have, or something on the net related, that I can easily use it.
alfa_80 gravatar image alfa_80  ( 2011-12-27 03:01:55 -0500 )edit
I'm now not getting any compile error, but, it seems that it doesn't enter the callback function, as I try to "ROS_INFO" in the function and look the output in rxconsole.
alfa_80 gravatar image alfa_80  ( 2012-01-07 14:15:51 -0500 )edit

Question Tools

Stats

Asked: 2011-12-22 08:32:10 -0500

Seen: 479 times

Last updated: Dec 25 '11