@@ -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
@@ -271,6 +283,12 @@ def test_conversion_SE2(self):
271283 self .assertIsInstance (tw .SE2 (), SE2 )
272284 self .assertEqual (len (tw .SE2 ()), 1 )
273285
286+ # from an SE(2) matrix, with and without checking
287+ for check in (True , False ):
288+ tw = Twist2 (T .A , check = check )
289+ self .assertEqual (len (tw ), 1 )
290+ array_compare (tw .SE2 (), T )
291+
274292 def test_conversion_se2 (self ):
275293 s = [1 , 2 , 3 ]
276294 x = Twist2 (s )
@@ -279,6 +297,12 @@ def test_conversion_se2(self):
279297 x .skewa (), np .array ([[0.0 , - 3.0 , 1.0 ], [3.0 , 0.0 , 2.0 ], [0.0 , 0.0 , 0.0 ]])
280298 )
281299
300+ # from an se(2) matrix, with and without checking
301+ for check in (True , False ):
302+ tw = Twist2 (x .skewa (), check = check )
303+ self .assertEqual (len (tw ), 1 )
304+ array_compare (tw , x )
305+
282306 def test_list_constuctor (self ):
283307 x = Twist2 ([1 , 0 , 0 ])
284308
0 commit comments