Skip to content

Commit 7bc43f5

Browse files
committed
fix #174 adjusted to work with erobots
1 parent ebc1035 commit 7bc43f5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

roboticstoolbox/robot/ERobot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ def fkine(self, q, end=None, start=None, tool=None):
903903
end, start, etool = self._get_limit_links(end, start)
904904

905905
if etool is not None and tool is not None:
906-
tool = (etool @ tool).A
906+
tool = (etool * tool).A
907907
elif etool is not None:
908908
tool = etool.A
909909
elif tool is not None:

roboticstoolbox/robot/IK.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,14 @@ def ikine_LMS(
495495
tcount = 0 # Total iteration count
496496

497497
# bool vector indicating revolute joints
498-
revolutes = np.array([link.isrevolute for link in self])
498+
# joints = np.array([link.isjoint for link in self])
499+
# revolutes = np.array([link.isrevolute for link in self])
500+
revolutes = []
501+
502+
for link in self:
503+
if link.isjoint:
504+
revolutes.append(link.isrevolute)
505+
revolutes = np.array(revolutes)
499506

500507
q = q0
501508
for Tk in T:
@@ -531,6 +538,8 @@ def ikine_LMS(
531538
# print(J)
532539

533540
# Wrap angles for revolute joints
541+
print(revolutes)
542+
print(q)
534543
k = np.logical_and(q > np.pi, revolutes)
535544
q[k] -= 2 * np.pi
536545

0 commit comments

Comments
 (0)