Skip to content

Commit ebc1489

Browse files
committed
IK work
1 parent 1ee4c01 commit ebc1489

File tree

1 file changed

+4
-1
lines changed
  • roboticstoolbox/robot

1 file changed

+4
-1
lines changed

roboticstoolbox/robot/IK.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ def ikine_LMS(
316316
:type tol: float
317317
:param ωN: damping coefficient
318318
:type ωN: float (default 1e-3)
319+
319320
:return: inverse kinematic solution
320321
:rtype: named tuple
321322
@@ -396,7 +397,7 @@ def ikine_LMS(
396397
def angle_axis(T, Td):
397398
d = base.transl(Td) - base.transl(T)
398399
R = base.t2r(Td) @ base.t2r(T).T
399-
l = np.r_[R[2, 1]-R[1, 2], R[0, 2] - R[2, 0], R[1, 0] - R[0, 1]] # noqa
400+
l = np.r_[R[2, 1] - R[1, 2], R[0, 2] - R[2, 0], R[1, 0] - R[0, 1]] # noqa
400401
if base.iszerovec(l):
401402
# diagonal matrix case
402403
if np.trace(R) > 0:
@@ -436,6 +437,8 @@ def angle_axis(T, Td):
436437
for Tk in T:
437438
iterations = 0
438439
failure = None
440+
nm = None
441+
439442
while True:
440443
# Update the count and test against iteration limit
441444
iterations += 1

0 commit comments

Comments
 (0)