Skip to content

Commit 94006ce

Browse files
committed
Compatibility with Orocos KDL after Joint.None was removed
See ros#45
1 parent dbb21bc commit 94006ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kdl_parser_py/kdl_parser_py/urdf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ def _toKdlInertia(i):
5050

5151
def _toKdlJoint(jnt):
5252

53-
fixed = lambda j,F: kdl.Joint(j.name, getattr(kdl.Joint, "None"))
53+
fixed = lambda j,F: kdl.Joint(
54+
j.name,
55+
getattr(kdl.Joint, "Fixed") if hasattr(kdl.Joint, 'Fixed') else getattr(kdl.Joint, 'None')
56+
)
5457
rotational = lambda j,F: kdl.Joint(j.name, F.p, F.M * kdl.Vector(*j.axis), kdl.Joint.RotAxis)
5558
translational = lambda j,F: kdl.Joint(j.name, F.p, F.M * kdl.Vector(*j.axis), kdl.Joint.TransAxis)
5659

0 commit comments

Comments
 (0)