callback with image and message transport not working..
Hi,
Not sure if it is bug with my code( probably it is ). Want some fresh pair of eyes on it.
So I am subscribing to the kinect2_bridge node with the following subscriber. subImageColorFull is a sd image topic
Some other topics are as follows.
topicC = K2_TOPIC_SD K2_TOPIC_IMAGE_COLOR K2_TOPIC_IMAGE_RECT; topicD = K2_TOPIC_SD K2_TOPIC_IMAGE_DEPTH K2_TOPIC_IMAGE_RECT; topicI = K2_TOPIC_SD K2_TOPIC_IMAGE_IR K2_TOPIC_IMAGE_RECT; topicF = K2_TOPIC_SD K2_TOPIC_IMAGE_COLOR ;
message_filters::Subscriber<sensor_msgs::Image>*subImageColorFull;
subImageColorFull = new message_filters::Subscriber<sensor_msgs::Image>(nh, topicColorFull, queueSize);
then there is the async filter I am using approximate time sync policy.
typedef message_filters::sync_policies::ApproximateTime<sensor_msgs::Image, sensor_msgs::Image, sensor_msgs::Image,
sensor_msgs::CameraInfo, sensor_msgs::CameraInfo,sensor_msgs::Image> ApproximateSyncPolicy;
And then I define the callback as follows.
syncApproximate = new message_filters::Synchronizer<ApproximateSyncPolicy>(ApproximateSyncPolicy(queueSize), *subImageColor, *subImageDepth, *subImageIr, *subCameraInfoColor, *subCameraInfoDepth,*subImageColorFull);
syncApproximate->registerCallback(boost::bind(&Receiver::callback, this,_1,_2,_3,_4,_5,_6));
The problem:
The callback is never serviced..
Can some one list out the possible bugs that I maybe overlooking ?
The code builds, compiles and runs needless to say.
One of my suspects was the topic name, I think it is ok, I am printing it out.
On a higher level, I am subscribing 6 topics from the kinect2_bridge. I started with kinect2_viewer and then built my code around it.
did you already tried to skip SyncApproximate and publish a log message for each topic in order to find out if the cause of the problem is the synchronizer or a single topic?
"publish a log message for each topic", is that using std::cout or any other ROS tool ?