Skip to content

Commit 757a088

Browse files
committed
reflect change to tr2jac
1 parent 384be82 commit 757a088

1 file changed

Lines changed: 3 additions & 18 deletions

File tree

‎tests/base/test_transforms3d.py‎

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -472,38 +472,23 @@ def test_delta2tr(self):
472472
def test_tr2jac(self):
473473

474474
# NOTE, create these matrices using pyprint() in MATLAB
475-
nt.assert_array_almost_equal(tr2jac(trotx(pi / 2)),
475+
# TODO change to forming it from block R matrices directly
476+
nt.assert_array_almost_equal(tr2jac(trotx(pi / 2)).T,
476477
np.array([[1, 0, 0, 0, 0, 0],
477478
[0, 0, 1, 0, 0, 0],
478479
[0, -1, 0, 0, 0, 0],
479480
[0, 0, 0, 1, 0, 0],
480481
[0, 0, 0, 0, 0, 1],
481482
[0, 0, 0, 0, -1, 0]]))
482483

483-
nt.assert_array_almost_equal(tr2jac(trotx(pi / 2), True),
484-
np.array([[1, 0, 0, 0, 0, 0],
485-
[0, 0, 1, 0, 0, 0],
486-
[0, -1, 0, 0, 0, 0],
487-
[0, 0, 0, 1, 0, 0],
488-
[0, 0, 0, 0, 0, 1],
489-
[0, 0, 0, 0, -1, 0]]))
490-
491-
nt.assert_array_almost_equal(tr2jac(transl(1, 2, 3)),
484+
nt.assert_array_almost_equal(tr2jac(transl(1, 2, 3)).T,
492485
np.array([[1, 0, 0, 0, 0, 0],
493486
[0, 1, 0, 0, 0, 0],
494487
[0, 0, 1, 0, 0, 0],
495488
[0, 0, 0, 1, 0, 0],
496489
[0, 0, 0, 0, 1, 0],
497490
[0, 0, 0, 0, 0, 1]]))
498491

499-
nt.assert_array_almost_equal(tr2jac(transl(1, 2, 3), True),
500-
np.array([[1, 0, 0, 0, 3, -2],
501-
[0, 1, 0, -3, 0, 1],
502-
[0, 0, 1, 2, -1, 0],
503-
[0, 0, 0, 1, 0, 0],
504-
[0, 0, 0, 0, 1, 0],
505-
[0, 0, 0, 0, 0, 1]]))
506-
507492
# test with scalar value
508493
# verifyError(tc, @()tr2jac(1),'SMTB:t2r:badarg');
509494

0 commit comments

Comments
 (0)