Ask Your Question
0

ROS message_filter ExactTime queue

asked 2017-04-22 08:37:14 -0500

Mondi gravatar image

Hallo community,

I want to provide only the newest combined RGBD message to a image processing nodelet. For this purpose I use the exact time synchronizer. But Im still a little bit uncertain which queue size has to be one to get only the newest combined message. Must the queue of the synchronizer be 1 or queue of the message subscribers and which size the other queue should have?

exactSyncDepth_ = new message_filters::Synchronizer<RGBDExactSyncDepthPolicy>(RGBDExactSyncDepthPolicy(syncQueueSize), imageSub_, imageDepthSub_,cameraInfoSub_); 

imageSub_.subscribe(rgb_it, rgb_nh.resolveName("image"), subQueueSize, hintsRgb);
imageDepthSub_.subscribe(depth_it, depth_nh.resolveName("image"), subQueueSize, hintsDepth);
cameraInfoSub_.subscribe(rgb_nh, "camera_info", subQueueSize)

Best,

Manuel

edit retag flag offensive close merge delete

Comments

When you post source, you should make it as complete and minimal as possible. Including the variable declarations would have made the source you posted much easier to understand quickly.

Geoff gravatar image Geoff  ( 2017-04-23 21:40:57 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-23 21:40:18 -0500

Geoff gravatar image

If syncQueueSize is 1, then the synchronizer should only ever have the most recent combined message available.

The other queues will need to be a suitable size to ensure that when the later message arrives, the topic with the message that arrived earlier still has a message with the same timestamp. If one topic is slower than the other by enough and the queues are too small, the synchroniser might not find a matching pair of messages. In general I don't think this will be a problem because of your sensor type, but be aware that tuning the queue sizes of the inputs may be necessary.

edit flag offensive delete link more

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: 2017-04-22 08:37:14 -0500

Seen: 156 times

Last updated: Apr 23 '17