Is there a way to synchronize ROS time and the time originating from a rosbag?
Some details: I'd like to compare real world data with simulated data, for this reason I'd like to play a rosbag (containing the real world data) and apply the recorded commands to a Gazebo model of the robot. For this purpose I set /use_sim_time to true and call rosbag play with the option --clock. Unfortunately I observe jumps in /clock topic - as it seems to me both the simulated time (from Gazebo) and the time originating from the rosbag are published to /clock. This leads in the end to a defective result - in particular the odometry data provided by the robot_localization package comes along with huge variances (magnitude 1e+4). Is there a solution to this problem? I would appreciate your help.
BR, Florian