ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
message_filters::Subscriber<A> A_sub(nh, "/a", 1);
message_filters::Subscriber<B> B_sub(nh, "/b", 1);
message_filters::Subscriber<C> C_sub(nh, "/c", 1);
typedef sync_policies::ExactTime<A, B> MySyncPolicy1;
Synchronizer<MySyncPolicy1> sync1(MySyncPolicy1(10), a_sub, b_sub);
typedef sync_policies::ApproximateTime<B, C> MySyncPolicy2;
Synchronizer<MySyncPolicy2> sync2(MySyncPolicy2(10), b_sub, c_sub);
sync1.registerCallback(boost::bind(&callback1, _1, _2));
sync2.registerCallback(boost::bind(&callback2, _1, _2));
Does something like this solves your problem? Or you want to also combine the output of these filters?