8000 fix bug with SE(n) x (n-1 x m) array, convert to/from homogeneous coo… · Kith78/spatialmath-python@d14a62d · GitHub
[go: up one dir, main page]

Skip to content

Commit d14a62d

Browse files
committed
fix bug with SE(n) x (n-1 x m) array, convert to/from homogeneous coordinates
this allows SE(n) to be applied to Euclidean vectors
1 parent 0f008b9 commit d14a62d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spatialmath/baseposematrix.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,8 +1122,11 @@ def __mul__(
11221122
# SO(n) x vector
11231123
return left.A @ v
11241124
else:
1125-
if right.shape == left.A.shape:
1126-
# SE(n) x (nxn)
1125+
if left.isSE:
1126+
# SE(n) x array
1127+
return base.h2e(left.A @ base.e2h(right))
1128+
else:
1129+
# SO(n) x array
11271130
return left.A @ right
11281131

11291132
elif len(left) > 1 and base.isvector(right, left.N):

0 commit comments

Comments
 (0)
0