Skip to content

Commit 19a57a9

Browse files
committed
Add tool to robot print, fix #344
1 parent 2899743 commit 19a57a9

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

roboticstoolbox/robot/DHRobot.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ class DHRobot(Robot):
7777
"""
7878

7979
def __init__(self, links, meshdir=None, **kwargs):
80-
8180
# Verify L
8281
if not isinstance(links, list):
8382
raise TypeError("The links must be stored in a list.")
@@ -92,7 +91,6 @@ def __init__(self, links, meshdir=None, **kwargs):
9291

9392
for link in links:
9493
if isinstance(link, DHLink):
95-
9694
# got a link
9795
all_links.append(link)
9896
link.number = self._n + 1
@@ -287,7 +285,7 @@ def angle(theta, fmt=None):
287285
if tool is not None:
288286
table.row(
289287
"tool",
290-
tool.printline(orient="rpy/xyz", fmt="{:.2g}", file=None),
288+
tool.strline(orient="rpy/xyz", fmt="{:.2g}"),
291289
)
292290
s += "\n" + str(table)
293291

@@ -323,7 +321,6 @@ def __add__(self, L):
323321
)
324322

325323
def __deepcopy__(self, memo):
326-
327324
links = []
328325

329326
for link in self.links:
@@ -425,7 +422,6 @@ def _set_link_fk(self, q):
425422
tall = self.fkine_all(q, old=True)
426423

427424
for i, link in enumerate(self.links):
428-
429425
# Update the link model transforms
430426
for col in link.collision:
431427
col.wT = tall[i]
@@ -952,7 +948,6 @@ def fkine(self, q, **kwargs):
952948

953949
T = SE3.Empty()
954950
for qr in getmatrix(q, (None, self.n)):
955-
956951
first = True
957952
for q, L in zip(qr, self.links):
958953
if first:
@@ -1002,7 +997,6 @@ def fkine_path(self, q, old=None):
1002997
return T
1003998

1004999
def segments(self):
1005-
10061000
segments = [None]
10071001
segments.extend(self.links)
10081002
return [segments]
@@ -1618,7 +1612,6 @@ def removesmall(x):
16181612
# ----------------- the forward recursion -------------------- #
16191613

16201614
for j, link in enumerate(self.links):
1621-
16221615
Rt = Rm[j].T # transpose!!
16231616
pstar = pstarm[:, j]
16241617
r = link.r
@@ -2482,7 +2475,6 @@ def _cross(a, b):
24822475

24832476

24842477
if __name__ == "__main__": # pragma nocover
2485-
24862478
import roboticstoolbox as rtb
24872479

24882480
# import spatialmath.base.symbolic as sym

0 commit comments

Comments
 (0)