I wrote an approximate_time_synchronizer: /ros/pkgs/wg-ros-pkg-trunk/sandbox/approximate_time_synchronizer It is being integrated into message_filters, but in the meantime you can use it from there. There is some overview of it at: http://www.ros.org/wiki/message_filters/ApproximateTime The nice thing is that it does not require an epsilon. It just returns the "best match" between the two streams of messages (topics). I hope this helps. Romain On Mon, Mar 15, 2010 at 11:27 AM, Dan Lazewatsky wrote: > Thanks Patrick, > What you brought up doesn't fix my problem, but does elucidate what's > actually going on. It turns out that there are two problems I'm having: > 1) The images are being published independently by two nodes, so they never > have the same timestamp, and thus will never get matched up. Is there a way > to give TimeSynchronizer a threshold so it will match two message that are > close enough? > 2) Based on #1, using the raw transport actually shouldn't work. The reason > it currently does is because cvToImgMsg doesn't fill in the header, so all > timestamps are 0. I can manually set the timestamps/headers before sending > off the message, but isn't cv_bridge supposed to do this? > > Thanks, > -Dan > > On 3/12/10 9:22 PM, Patrick Mihelich wrote: > > Hi Dan, > > You might need to increase the size of the queues used by the subscriber > filters and/or the synchronizer. If those queues fill up, messages can get > bumped off before they form a complete synchronized set. > > For debugging purposes it can be useful to register another callback to the > subscriber filters, just so you know when they get any data. I've attached > some sample source code. > > "compressed" transport definitely should work with the time synchronizer. > "theora" will not work reliably because it seems the plugin doesn't retain > the timestamp of the original image. I've opened a ticket for that. > > HTH, > Patrick > > On Fri, Mar 12, 2010 at 9:12 AM, Dan Lazewatsky > wrote: >> >> Thanks, that did the trick. One thing I'm still having trouble with is >> getting transports other than raw to work with >> image_transport::SubscriberFilter. If I pass image_transport::TransportHints >> th(transport) to image_transport::SubscriberFilter, where transport is >> "compressed" or "theora", I never seem to get any data. rxgraph -t shows >> that my node is connected to my image publisher on the right topic, but the >> callback never gets called. >> >> Thanks, >> -Dan >> >> On 3/11/10 5:11 PM, Patrick Mihelich wrote: >> >> On Thu, Mar 11, 2010 at 2:55 PM, Dan Lazewatsky >> wrote: >>> >>> On a related note, is there a way to use TimeSynchronizer with >>> image_transport rather than subscribing to the image directly? >> >> Use image_transport::SubscriberFilter as a drop-in replacement for >> message_filters::Subscriber. It uses an image_transport subscriber under the >> hood. >> >> Cheers, >> Patrick >> >> _______________________________________________ >> ros-users mailing list >> ros-users@code.ros.org >> https://code.ros.org/mailman/listinfo/ros-users >> >> >> _______________________________________________ >> ros-users mailing list >> ros-users@code.ros.org >> https://code.ros.org/mailman/listinfo/ros-users >> > > > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users > > > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users > >