Created
March 24, 2017 10:38
-
-
Save mintar/7ef7a21c67c09546d2a7fc20c00a3e17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import rospy | |
import rosbag | |
# duration between the epoch and Oct 06 2012 17:15:38.30 | |
TIME_OFFSET = rospy.Duration(1349536538.30) | |
with rosbag.Bag('output.bag', 'w') as outbag: | |
for topic, msg, t in rosbag.Bag('input.bag').read_messages(): | |
t += TIME_OFFSET | |
outbag.write(topic, msg, t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment