Skip to content

Commit 9a225e8

Browse files
committed
fix bug in interp1(), use capability of trinterp to help in this case
1 parent 1d21d52 commit 9a225e8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

spatialmath/baseposematrix.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -476,10 +476,6 @@ def interp1(self, s=None):
476476
s = base.getvector(s)
477477
s = np.clip(s, 0, 1)
478478

479-
if start is not None:
480-
assert len(start) == 1, 'len(start) must == 1'
481-
start = start.A
482-
483479
if self.N == 2:
484480
# SO(2) or SE(2)
485481
if len(s) > 1:
@@ -491,9 +487,9 @@ def interp1(self, s=None):
491487
# SO(3) or SE(3)
492488
if len(s) > 1:
493489
assert len(self) == 1, 'if len(s) > 1, len(X) must == 1'
494-
return self.__class__([base.trinterp(start, self.A, s=_s) for _s in s])
490+
return self.__class__([base.trinterp(None, self.A, s=_s) for _s in s])
495491
else:
496-
return self.__class__([base.trinterp(start, x, s=s[0]) for x in self.data])
492+
return self.__class__([base.trinterp(None, x, s=s[0]) for x in self.data])
497493
def norm(self):
498494
"""
499495
Normalize pose (superclass method)

0 commit comments

Comments
 (0)