Skip to content

Commit c77d80f

Browse files
committed
fix qlim
1 parent 444d828 commit c77d80f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

roboticstoolbox/robot/ETS.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -288,17 +288,18 @@ def qlim(self):
288288
>>> robot.qlim
289289
"""
290290
limits = zeros((2, self.n))
291-
for i, j in enumerate(self.joints()):
292-
if self.data[j].isrotation:
293-
if self.data[j].qlim is None:
291+
292+
for i, et in enumerate(self.joints()):
293+
if et.isrotation:
294+
if et.qlim is None:
294295
v = [-pi, pi]
295296
else:
296-
v = self.data[j].qlim
297-
elif self.data[j].istranslation:
298-
if self.data[j].qlim is None:
297+
v = et.qlim
298+
elif et.istranslation:
299+
if et.qlim is None:
299300
raise ValueError("undefined prismatic joint limit")
300301
else:
301-
v = self.data[j].qlim
302+
v = et.qlim
302303
else:
303304
raise ValueError("Undefined Joint Type")
304305
limits[:, i] = v

0 commit comments

Comments
 (0)