rosbag: fix bug in get_indexes
This commit is contained in:
parent
d818f5392a
commit
f79bcb3fba
|
@ -837,7 +837,7 @@ class _BagReader(object):
|
|||
if topics is None and topic_filter is None:
|
||||
return self.bag._topic_indexes.values()
|
||||
|
||||
if topics is not None:
|
||||
if topics is None:
|
||||
topics = self.bag._topic_indexes.keys()
|
||||
|
||||
if topic_filter is not None:
|
||||
|
|
|
@ -99,10 +99,15 @@ def main():
|
|||
b.write('/ints', msg, t)
|
||||
b.close()
|
||||
|
||||
start_time = roslib.rostime.Time.from_sec(0)
|
||||
end_time = roslib.rostime.Time.from_sec(8)
|
||||
for (topic, msg, t) in rosbag.Bag('timing.bag').getMessages(topics=['/intsa'], start_time=start_time, end_time=end_time):
|
||||
print topic, msg, t
|
||||
|
||||
sys.exit()
|
||||
|
||||
if __name__ == '__main__':
|
||||
#main()
|
||||
main()
|
||||
|
||||
import rostest
|
||||
rostest.run(PKG, 'TestRosbag', TestRosbag, sys.argv)
|
||||
|
|
Loading…
Reference in New Issue