Ask Your Question
0

message_filters with PoseStamped

asked 2020-02-25 05:58:36 -0500

Teslarekt gravatar image

updated 2020-02-25 14:07:36 -0500

gvdhoorn gravatar image

Hello, I want to use message_filters on different msg types aswell as my custom msgs later on.. But it does not seem to work with PoseStamped. Marker and PointCloud2 together work.

I made sure that every message has a Header from std_msgs, but still not working..

Error Message:

usr/include/boost/bind/bind.hpp: In instantiation of ‘struct boost::_bi::result_traits<boost::_bi::unspecified, void (*)(const boost::shared_ptr<const sensor_msgs::PointCloud2_<std::allocator<void> > >&, const boost::shared_ptr<const visualization_msgs::Marker_<std::allocator<void> > >&, const boost::shared_ptr<const geometry_msgs::PoseStamped_<std::allocator<void> > >&)>’:
/usr/include/boost/bind/bind.hpp:883:48:   required from ‘class boost::_bi::bind_t<boost::_bi::unspecified, void (*)(const boost::shared_ptr<const sensor_msgs::PointCloud2_<std::allocator<void> > >&, const boost::shared_ptr<const visualization_msgs::Marker_<std::allocator<void> > >&, const boost::shared_ptr<const geometry_msgs::PoseStamped_<std::allocator<void> > >&), boost::_bi::list2<boost::arg<1>, boost::arg<2> > >’
/home/umut/catkin_ws/src/scan_matching/src/listener.cpp:60:54:   required from here
/usr/include/boost/bind/bind.hpp:69:37: error: ‘void (*)(const boost::shared_ptr<const sensor_msgs::PointCloud2_<std::allocator<void> > >&, const boost::shared_ptr<const visualization_msgs::Marker_<std::allocator<void> > >&, const boost::shared_ptr<const geometry_msgs::PoseStamped_<std::allocator<void> > >&)’ is not a class, struct, or union type
     typedef typename F::result_type type;
                                     ^
In file included from /usr/include/boost/function/detail/maybe_include.hpp:58:0,
                 from /usr/include/boost/function/detail/function_iterate.hpp:14,
                 from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:92,
                 from /usr/include/boost/function.hpp:64,
                 from /opt/ros/kinetic/include/ros/forwards.h:40,
                 from /opt/ros/kinetic/include/ros/common.h:37,
                 from /opt/ros/kinetic/include/ros/ros.h:43,
                 from /home/umut/catkin_ws/src/scan_matching/src/listener.cpp:2:
/usr/include/boost/function/function_template.hpp: In instantiation of ‘static void boost::detail::function::void_function_obj_invoker9<FunctionObj, R, T0, T1, T2, T3, T4, T5, T6, T7, T8>::invoke(boost::detail::function::function_buffer&, T0, T1, T2, T3, T4, T5, T6, T7, T8) [with FunctionObj = boost::_bi::bind_t<boost::_bi::unspecified, boost::_bi::bind_t<boost::_bi::unspecified, void (*)(const boost::shared_ptr<const sensor_msgs::PointCloud2_<std::allocator<void> > >&, const boost::shared_ptr<const visualization_msgs::Marker_<std::allocator<void> > >&, const boost::shared_ptr<const geometry_msgs::PoseStamped_<std::allocator<void> > >&), boost::_bi::list2<boost::arg<1>, boost::arg<2> > >, boost::_bi::list9<boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7>, boost::arg<8>, boost::arg<9> > >; R = void; T0 = const boost::shared_ptr<const sensor_msgs::PointCloud2_<std::allocator<void> > >&; T1 = const boost::shared_ptr<const visualization_msgs::Marker_<std::allocator<void> > >&; T2 = const boost::shared_ptr<const geometry_msgs::PoseStamped_<std::allocator<void> > >&; T3 = const boost::shared_ptr<const message_filters::NullType>&; T4 = const boost::shared_ptr<const message_filters::NullType>&; T5 = const boost::shared_ptr<const message_filters::NullType>&; T6 = const boost::shared_ptr<const message_filters::NullType>&; T7 = const boost::shared_ptr<const message_filters::NullType>&; T8 = const boost::shared_ptr<const message_filters::NullType>&]’:
/usr/include/boost/function/function_template.hpp:940:38:   required from ‘void boost::function9<R, T1, T2, T3, T4, T5, T6, T7, T8, T9>::assign_to(Functor) [with Functor = boost::_bi::bind_t<boost::_bi::unspecified, boost::_bi::bind_t<boost::_bi::unspecified, void (*)(const boost::shared_ptr<const sensor_msgs::PointCloud2_<std::allocator<void> > >&, const boost::shared_ptr<const visualization_msgs::Marker_<std::allocator<void> > >&, const ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-02-25 18:57:54 -0500

atas gravatar image

updated 2020-02-25 18:58:38 -0500

sync.registerCallback(boost::bind(&callback, _1, _2));

where is _3 in the callback ?

edit flag offensive delete link more

Comments

Omg.. I didn't even realize what _1,_2 etc. stood for... worked perfectly ! Thank you so much !

Teslarekt gravatar image Teslarekt  ( 2020-02-26 05:35:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-02-25 05:58:36 -0500

Seen: 33 times

Last updated: Feb 26