Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 475

Rosbag python timestamp read

$
0
0
Hello guys , I have the following function: import rospy, time import rosbag def test_function(self, topics_dict, start, stop): bag = rosbag.Bag('test.bag') topic_msg_list = [] startTime = rospy.Time.from_sec(start) print starTime stopTime = rospy.Time.from_sec(stop) print stoPime for topic, msg, rb_tmstmp in bag.read_messages(topics_dict, start_time=startTime, end_time=stopTime): print "im in" for msg_to_check in topics_dict.get(str(topic)): print msg I use it like the following: rb.test_function({'/topic': ['message']}, 1502709999.42, 1503000000.61) But i never get to see the printed output even the 'im in'. What is the problem with the timestamps? Thanks

Viewing all articles
Browse latest Browse all 475

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>