0
$\begingroup$

Rosanswers logo

Right now, I'm recording the two topics using rosbag and seeing if the messages are aligned. But, I'm not sure if rosbag respects the original timestamps or gives a new timestamp based on when it received the message.


Originally posted by ravich on ROS Answers with karma: 11 on 2017-11-03

Post score: 1


Original comments

Comment by tfoote on 2017-11-03:
Can you clarify what timestamp you are asking about?

Comment by ravich on 2017-11-04:
header.stamp of the message. I had recorded /camera/depth/image_raw and /camera/rgb/image_raw from freenect, and expected these 2 sensor_msgs/Image topics to have the same time stamp, but on checking them with rqt_bag I found that the messages were misaligned.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

rosbag will not modify timestamp data inside the bag file. However it will publish as accurately as possible related to the receive time during the playback. Two parallel message topics are not synchronized or guarenteed in order. Going through rosbag adds another layer of complexity.

The recommended approach to synchronize parallel topics is a message_filter based synchronizer: http://wiki.ros.org/message_filters#Policy-Based_Synchronizer_.5BROS_1.1.2B-.5D

There are standard filters for ExactTime Policy as well as ApproximateTIme documented there.


Originally posted by tfoote with karma: 58457 on 2017-11-04

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.