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

Revision history [back]

click to hide/show revision 1
initial version

When recording, rosbag and rqt_bag use the time that the recording node received the message as the bag timestamp.

The bag timestamp is part of the bag file format; it is not related to any timestamp that might be in the header of your message. (not all messages have headers or timestamps).

If you want to rewrite the bag timestamps to match the header timestamps, you'll need to use the rosbag API to open the bag file, read the messages and update the timestamps on the topics you care about. This is the first example in the rosbag cookbook: http://wiki.ros.org/rosbag/Cookbook

When recording, rosbag and rqt_bag use the time that the recording node received the message as the bag timestamp.

The bag timestamp is part of the bag file format; it is not related to any timestamp that might be in the header of your message. (not all messages have headers or timestamps).

If you want to rewrite the bag timestamps to match the header timestamps, you'll need to use the rosbag API to open the bag file, read the messages and update the timestamps on the topics you care about. This is the first example in the rosbag cookbook: http://wiki.ros.org/rosbag/Cookbookhttp://wiki.ros.org/rosbag/Cookbook#Rewrite_bag_with_header_timestamps