We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dabbcf6 commit 2e32897Copy full SHA for 2e32897
spatialmath/base/animate.py
@@ -214,10 +214,12 @@ def update(frame, animation):
214
if isinstance(frame, float):
215
# passed a single transform, interpolate it
216
T = smb.trinterp(start=self.start, end=self.end, s=frame)
217
- else:
218
- # assume it is an SO(3) or SE(3)
+ elif isinstance(frame, NDArray):
+ # type is SO3Array or SE3Array when Animate.trajectory is not None
219
T = frame
220
- # ensure result is SE(3)
+ else:
221
+ # other types, attempt to convert
222
+ T = np.array(frame)
223
224
if T.shape == (3, 3):
225
T = smb.r2t(T)
0 commit comments