Synchronization of 2 kinds of timestamp
A node of mine publishes some messages in which their timestamps are according to a dataset read from a file (See Timestamp A below). In the node, there is another subscription of a topic from another node, which uses ROS timestamp (ros::Time::now())(See Timestamp B below).
Timestamp A
-----------
678
680
683
685
Timestamp B from ROS
-----------
Output 1 of ros::Time::now()
Output 2 of ros::Time::now()
Output 3 of ros::Time::now()
How do I alter/synchronize or map one to another those two kinds of timestamp, because if I want to use message_filters, for example, their timestamps should match. The synchronization, I mean, such that Timestamp of 678 in Timestamp A should match Output 1 of ros::Time::now() in Timestamp B, Timestamp of 680 in Timestamp A should match Output 2 of ros::Time::now() in Timestamp B and so on.
EDIT: My problem is in Timestamp A it's already at 678 seconds say, but in Timestamp B, it's another value comes in(whatever value ros::Time::now() at that moment). I need to process corresponding 2 values with regard to the comparable timestamp of them. How do I match those 2 timestamps?