Main Page
Namespaces
Classes
Files
File List
test
transmission
test.py
Go to the documentation of this file.
1
#!/usr/bin/python
2
3
import
os
4
from
urdf_parser_py
import
urdf
5
import
subprocess
as
sp
6
7
orig =
'test.urdf'
8
gen =
'/tmp/test.urdf'
9
patch =
'/tmp/test.patch'
10
11
os.chdir(os.path.dirname(__file__))
12
robot = urdf.Robot.from_xml_file(
'test.urdf'
)
13
14
for
transmission
in
robot.transmissions:
15
print
type(transmission)
16
17
with open(gen,
'w'
)
as
f:
18
f.write(robot.to_xml_string())
19
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 Fri Jun 7 2019 21:42:12