Go to the documentation of this file.00001 import sys
00002
00003
00004 pname = sys.argv[1]
00005
00006
00007
00008 stllist = []
00009 fstlist = open("daelist.txt","r")
00010 for fname in fstlist:
00011 stllist.append(fname.replace(".dae","").replace("\n",""))
00012 print stllist
00013 fstlist.close()
00014
00015 for m in stllist:
00016 t = open("TEMPLATE.urdf","r")
00017 f = open("urdf/"+m+".urdf","w")
00018 for line in t:
00019 line = line.replace("${MODEL_ID}",m)
00020 line = line.replace("${PACKAGE}",pname)
00021 print >>f, line,
00022 print "Did\t\t\t\t"+m
00023 f.close()
00024 t.close()
00025
00026
00027