Go to the documentation of this file.00001
00002
00003 import roslib; roslib.load_manifest('articulation_structure')
00004 import rospy
00005 import rosbag
00006 import sys
00007
00008 def process_bags(infile,
00009 outfile):
00010
00011 outbag = rosbag.Bag(outfile,"w")
00012 for topic,msg,t in rosbag.Bag(infile).read_messages():
00013 outbag.write(topic,msg,msg.header.stamp)
00014
00015 if rospy.is_shutdown():
00016 break;
00017
00018 outbag.close()
00019
00020 if __name__ == '__main__':
00021 if len(sys.argv) != 3:
00022 print "Usage: process_structure <in.bag> <out.bag>"
00023 sys.exit()
00024
00025 infile = sys.argv[1]
00026 outfile = sys.argv[2]
00027 process_bags(infile,outfile)