TimeSynchronizer Callback problem
I have a problem using the TimeSynchronizer.
I added sub1 and sub2 to test if there is a with the subscriber, but in both cases the callbacks test_callback and test_callback2 are called. Only the synchronized callback is not called.
Thank you very much.
Here is the main part:
ros::Subscriber sub1 = nh.subscribe("/camera/rgb/image_rect_color", 1, test_callback);
ros::Subscriber sub2 = nh.subscribe("/camera/depth_registered/image_rect", 1, test_callback2);
message_filters::Subscriber<sensor_msgs::Image> image_sub(nh, "/camera/rgb/image_rect_color", 1);
message_filters::Subscriber<sensor_msgs::Image> depth_sub(nh, "/camera/depth_registered/image_rect", 1);
TimeSynchronizer<sensor_msgs::Image, sensor_msgs::Image> sync(image_sub, depth_sub, 10);
sync.registerCallback(boost::bind(&callback, _1, _2));