Ros on two machines, different time stamps
I have two ROSBAG
recorded on two different machines (ROS kinetic Ubuntu 16.04) at the same time. I need to synchronize messages of two bag files in order to be able to manipulate the data, I am using message_filters/sync_policies/approximate_time.h
. However, I get no output from approximate synchronizer which I guess is due to different ROS stamps on these two machines. Here is a sample frame stamp from two machines:
Machine 1:
sec 4583 | nsec 855689180
Machine 2:
sec 1570727234 | nsec 4864000
While I know the format for machine 2, I am not sure what format is the time being written on Machine 1, but I need to synchronize these two. My first question is that if chrony
can solve this issue? I tried checking the time difference by the command chronyc tracking
, yet it looks good to me:
System time : 0.000291987 seconds fast of NTP time
.
If chrony
wouldn't be helpful, how can I get these two machines clocks under the same format.