Skip to content

Commit 187589a

Browse files
committed
Fixing start link
Signed-off-by: elian-WSL22H <elian.neppel@posteo.eu>
1 parent 6eebbd3 commit 187589a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

roboticstoolbox/tools/urdf/urdf.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
ArrayLike3,
1717
getvector,
1818
unitvec,
19-
unitvec_norm,
20-
angvec2r,
21-
tr2rpy,
2219
)
2320

2421
from io import BytesIO
@@ -1950,11 +1947,12 @@ def _recursive_axis_definition(
19501947
SE3 resulting from the axis orientation of the parent joint
19511948
"""
19521949
if parentname is None:
1953-
base_link_exists = "base_link" in [j.name for j in self.elinks]
1954-
if base_link_exists:
1955-
parentname = "base_link"
1956-
else:
1957-
parentname = self.elinks[0].name
1950+
# starts again with all orphan links
1951+
for link in self.elinks:
1952+
if link.parent is None:
1953+
self._recursive_axis_definition(
1954+
parentname=link.name, parent_from_Rx_to_axis=None
1955+
)
19581956
if parent_from_Rx_to_axis is None:
19591957
parent_from_Rx_to_axis = SE3()
19601958

0 commit comments

Comments
 (0)