@@ -62,20 +62,20 @@ def fix_bagfile(inbag, outbag, topics, offset):
62
62
rospy .loginfo ('Closing output bagfile.' )
63
63
outbag .close ()
64
64
rospy .loginfo ('Changed the following:' )
65
- for k , v in count .iteritems ():
65
+ for k , v in count .items ():
66
66
rospy .loginfo ( '%s:%s messages.' ,k ,v )
67
67
68
68
if __name__ == "__main__" :
69
69
rospy .init_node ('bag_add_time_offset' )
70
70
parser = argparse .ArgumentParser (
71
71
description = 'Shift the publishing time of given topics in input bagfile.' )
72
72
parser .add_argument ('-o' , metavar = 'OUTPUT_BAGFILE' , required = True , help = 'output bagfile' )
73
- parser .add_argument ('-i' , metavar = 'INPUT_BAGFILE' , required = True , help = 'input bagfile(s)' , nargs = '+' )
73
+ parser .add_argument ('-i' , metavar = 'INPUT_BAGFILE' , required = True , help = 'input bagfile(s)' )
74
74
parser .add_argument ('-of' , metavar = 'OFFSET' , required = True , type = float , help = 'time offset to add in seconds' )
75
75
parser .add_argument ('-t' , metavar = 'TOPIC' , required = True , help = 'topic(s) to change' , nargs = '+' )
76
76
args = parser .parse_args ()
77
77
try :
78
- fix_bagfile (args .i , args .o , arg .t , args .of )
79
- except Exception , e :
78
+ fix_bagfile (args .i , args .o , args .t , args .of )
79
+ except Exception as e :
80
80
import traceback
81
81
traceback .print_exc ()
0 commit comments