rosbag --clock time for files recorded on a different machine
I ran rosbag record on a laptop to produce a bag file. However, all of the nodes producing the topics were on my robot's computer (i.e., on the same network, but not on the same machine). I am now trying to play back the data using rosbag play --clock <filename>, but the time being produced by /clock is about two minutes off from the time embedded in one of my sensor messages (/imu/data). I'm assuming that the time on the laptop was different than the time on the robot's computer, and that is what's accounting for this issue. Where does ROS get its initial time when playing back a bag file? Is there any way to change it? Ideally, I'd like it to be in line with the first message that was received from any sensor.
The reason it's a problem for me is that I am using robot_pose_ekf (with use_sim_time set), which is waiting for a transformation from /imu to /base_footprint. However, the time difference between ros::Time::now() and the IMU message's timestamp is ~130 seconds, and robot_pose_ekf is only using a transform time difference of 0.5 seconds.