@@ -67,6 +67,12 @@ def test_conversion_SE3(self):
6767 T = SE3 .Rx (0 ) * SE3 (1 , 2 , 3 )
6868 array_compare (Twist3 (T ).SE3 (), T )
6969
70+ # from an SE(3) matrix, with and without checking
71+ for check in (True , False ):
72+ tw = Twist3 (T .A , check = check )
73+ self .assertEqual (len (tw ), 1 )
74+ array_compare (tw .SE3 (), T )
75+
7076 def test_conversion_se3 (self ):
7177 s = [1 , 2 , 3 , 4 , 5 , 6 ]
7278 x = Twist3 (s )
@@ -83,6 +89,12 @@ def test_conversion_se3(self):
8389 ),
8490 )
8591
92+ # from an se(3) matrix, with and without checking
93+ for check in (True , False ):
94+ tw = Twist3 (x .skewa (), check = check )
95+ self .assertEqual (len (tw ), 1 )
96+ array_compare (tw , x )
97+
8698 def test_conversion_Plucker (self ):
8799 pass
88100
@@ -319,6 +331,12 @@ def test_conversion_SE2(self):
319331 self .assertIsInstance (tw .SE2 (), SE2 )
320332 self .assertEqual (len (tw .SE2 ()), 1 )
321333
334+ # from an SE(2) matrix, with and without checking
335+ for check in (True , False ):
336+ tw = Twist2 (T .A , check = check )
337+ self .assertEqual (len (tw ), 1 )
338+ array_compare (tw .SE2 (), T )
339+
322340 def test_conversion_se2 (self ):
323341 s = [1 , 2 , 3 ]
324342 x = Twist2 (s )
@@ -327,6 +345,12 @@ def test_conversion_se2(self):
327345 x .skewa (), np .array ([[0.0 , - 3.0 , 1.0 ], [3.0 , 0.0 , 2.0 ], [0.0 , 0.0 , 0.0 ]])
328346 )
329347
348+ # from an se(2) matrix, with and without checking
349+ for check in (True , False ):
350+ tw = Twist2 (x .skewa (), check = check )
351+ self .assertEqual (len (tw ), 1 )
352+ array_compare (tw , x )
353+
330354 def test_list_constuctor (self ):
331355 x = Twist2 ([1 , 0 , 0 ])
332356
0 commit comments