ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
My guess would be, that it's because your subscribers are local variables and are destructed when Message_Filter::Message_Filter()
returns. Try making your subscribers, your synchronizer and your publisher member variables of your class.
It also depends on how your main(...)
looks like, but there you also need to make sure your Message_Filter
object does not go out of scope, but I suppose you have that already by blocking inros::spin()
2 | No.2 Revision |
My guess would be, that it's because your subscribers are local variables and are destructed when Message_Filter::Message_Filter()
returns. Try making your subscribers, subscribers and your synchronizer and your publisher member variables of your class.
It also depends on how your main(...)
looks like, but there you also need to make sure your Message_Filter
object does not go out of scope, but I suppose you have that already by blocking inros::spin()