ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Record bag file for use with time synchronizer

asked 2019-02-12 10:54:26 -0600

strike_eagle_iii gravatar image

I've been testing an algorithm using the EuRoC dataset. The dataset publishes synchronized camera images from two cameras along with IMU data. My application uses a TimeSynchronizer to process both both frames and works great on the EuRoC dataset.

I recorded my own datasets using an IMU and two Point Grey cameras that are hardware triggered. I used rosbag to record the three topics I thought I needed however when I play it back, no data makes it through the TimeSynchronizer. I can remove the TimeSynchronizer and things work but I can only use one camera.

Looking at the header timestamps on both messages, they're generally well within 1ms of each other (generally within 500 us) .

How close do the timestamps have to be for the TimeSynchronizer to pass them? Is there something special I should've done when recording the bag files to indicate the two camera topics were synchronized?

edit retag flag offensive close merge delete



You could modify the message filter so it used an Approximate time synchroniser instead. This should solve the problem in your case.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-02-12 10:59:32 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-12 11:12:12 -0600

ahendrix gravatar image

The Time synchronizer requires that the timestamps match exactly. In practice, most stereo camera drivers capture both images simultaneously in the driver, apply the same timestamp to both, and publish them on separate topics.

If you are running a separate driver for each camera, or trying to synchronize cameras with an IMU, the Approximate time synchronizer that @PeteBlackerThe3rd recommends is a more appropriate solution.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-02-12 10:54:26 -0600

Seen: 715 times

Last updated: Feb 12 '19