28 parser = argparse.ArgumentParser(usage=
'Load an URDF file')
29 parser.add_argument(
'-i',
'--input', default=
None, help=
'file containing the trajectory (rostopic echo controller/follow_joint_trajectory/goal)')
32 args = parser.parse_args()
33 if os.path.isfile(args.input):
34 output = args.input[0:args.input.rfind(
'.')] +
'_modified' + args.input[args.input.rfind(
'.'):]
36 file = open(args.input,
'r') 37 lines = file.readlines() 38 outfile = open(output,'w+')
39 for i
in range(12,len(lines)-6):
40 outfile.write(lines[i][2:])
44 print "input file doesn't exist"