Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spatialmath/base/transforms3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,7 @@ def trinterp(start, end, s, shortest=True):

return rt2tr(q2r(qunit(qr)), pr)
else:
return ValueError("Argument must be SO(3) or SE(3)")
raise ValueError("Argument must be SO(3) or SE(3)")


def delta2tr(d: R6) -> SE3Array:
Expand Down
6 changes: 6 additions & 0 deletions tests/base/test_transforms3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,12 @@ def test_trinterp(self):
nt.assert_array_almost_equal(trinterp(start=T0, end=T1, s=1), T1)
nt.assert_array_almost_equal(trinterp(start=T0, end=T1, s=0.5), np.eye(4))

with self.assertRaises(ValueError):
trinterp(None, np.zeros((2, 2)), 0.5)

with self.assertRaises(ValueError):
trinterp(None, np.zeros((5, 5)), 0.5)

def test_tr2delta(self):
# unit testing tr2delta with a tr matrix
nt.assert_array_almost_equal(
Expand Down