test.py
Go to the documentation of this file.
00001 #!/usr/bin/python
00002 
00003 import os
00004 from urdf_parser_py import urdf
00005 import subprocess as sp
00006 
00007 orig = 'test.urdf'
00008 gen = '/tmp/test.urdf'
00009 patch = '/tmp/test.patch'
00010 
00011 os.chdir(os.path.dirname(__file__))
00012 robot = urdf.Robot.from_xml_file('test.urdf')
00013 
00014 for transmission in robot.transmissions:
00015     print type(transmission)
00016 
00017 with open(gen, 'w') as f:
00018         f.write(robot.to_xml_string())
00019 sp.call('diff -u "{}" "{}" > "{}"'.format(orig, gen, patch), shell=True)


urdfdom_py
Author(s): Thomas Moulard, David Lu, Kelsey Hawkins, Antonio El Khoury, Eric Cousineau, Ioan Sucan , Jackie Kay
autogenerated on Thu Jun 6 2019 20:07:42