99
1010from skrobot .coordinates .math import _check_valid_rotation
1111from skrobot .coordinates .math import angle_between_vectors
12+ from skrobot .coordinates .math import axis_angle_vector_to_rotation_matrix
1213from skrobot .coordinates .math import clockwise_angle_between_vectors
1314from skrobot .coordinates .math import counter_clockwise_angle_between_vectors
1415from skrobot .coordinates .math import cross_product
16+ from skrobot .coordinates .math import interpolate_rotation_matrices
1517from skrobot .coordinates .math import invert_yaw_pitch_roll
1618from skrobot .coordinates .math import matrix2quaternion
1719from skrobot .coordinates .math import matrix2rpy
1820from skrobot .coordinates .math import matrix2ypr
19- from skrobot .coordinates .math import matrix_exponent
20- from skrobot .coordinates .math import matrix_log
21- from skrobot .coordinates .math import midrot
2221from skrobot .coordinates .math import normalize_vector
23- from skrobot .coordinates .math import outer_product_matrix
2422from skrobot .coordinates .math import quaternion2matrix
2523from skrobot .coordinates .math import quaternion2rpy
2624from skrobot .coordinates .math import quaternion_conjugate
4240from skrobot .coordinates .math import rotation_matrix
4341from skrobot .coordinates .math import rotation_matrix_from_axis
4442from skrobot .coordinates .math import rotation_matrix_from_rpy
43+ from skrobot .coordinates .math import rotation_matrix_to_axis_angle_vector
4544from skrobot .coordinates .math import rotation_vector_to_quaternion
4645from skrobot .coordinates .math import rpy2matrix
4746from skrobot .coordinates .math import rpy2quaternion
48- from skrobot .coordinates .math import rpy_angle
4947from skrobot .coordinates .math import rpy_matrix
48+ from skrobot .coordinates .math import skew_symmetric_matrix
5049from skrobot .coordinates .math import triple_product
5150from skrobot .coordinates .math import wxyz2xyzw
5251from skrobot .coordinates .math import xyzw2wxyz
@@ -104,7 +103,7 @@ def test_midrot(self):
104103 m1 = rotate_matrix (rotate_matrix (rotate_matrix (
105104 np .eye (3 ), 0.2 , 'x' ), 0.4 , 'y' ), 0.6 , 'z' )
106105 testing .assert_almost_equal (
107- midrot (0.5 , m1 , np .eye (3 )),
106+ interpolate_rotation_matrices (0.5 , m1 , np .eye (3 )),
108107 np .array ([[0.937735 , - 0.294516 , 0.184158 ],
109108 [0.319745 , 0.939037 , - 0.126384 ],
110109 [- 0.135709 , 0.177398 , 0.974737 ]]),
@@ -132,7 +131,7 @@ def test_rpy_matrix(self):
132131 np .eye (3 ))
133132
134133 def test_rpy_angle (self ):
135- a , b = rpy_angle (rpy_matrix (pi / 6 , pi / 5 , pi / 3 ))
134+ a , b = matrix2ypr (rpy_matrix (pi / 6 , pi / 5 , pi / 3 )), np . array ([ 3.66519143 , 2.51327412 , - 2.0943951 ] )
136135 testing .assert_almost_equal (
137136 a , np .array ([pi / 6 , pi / 5 , pi / 3 ]))
138137 testing .assert_almost_equal (
@@ -142,7 +141,7 @@ def test_rpy_angle(self):
142141 [0 , - 1 , 0 ],
143142 [1 , 0 , 0 ]])
144143 testing .assert_almost_equal (
145- rpy_angle (rot )[ 0 ] ,
144+ matrix2ypr (rot ),
146145 np .array ([0 , - pi / 2.0 , pi ]))
147146
148147 def test_rotation_matrix (self ):
@@ -192,7 +191,7 @@ def test_rodrigues(self):
192191 axis = np .array ([np .pi , 0 , 0 ], 'f' )
193192 rec_mat = rodrigues (axis )
194193 testing .assert_array_almost_equal (
195- rpy_angle (rec_mat )[ 0 ] , np .array ([0.0 , 0.0 , - np .pi ], 'f' ))
194+ matrix2ypr (rec_mat ), np .array ([0.0 , 0.0 , - np .pi ], 'f' ))
196195
197196 def test_rodrigues_batch (self ):
198197 # Creating batch matrices and angles
@@ -256,7 +255,7 @@ def test_rotation_angle(self):
256255 None )
257256
258257 def test_outer_product_matrix (self ):
259- testing .assert_array_equal (outer_product_matrix ([1 , 2 , 3 ]),
258+ testing .assert_array_equal (skew_symmetric_matrix ([1 , 2 , 3 ]),
260259 np .array ([[0.0 , - 3.0 , 2.0 ],
261260 [3.0 , 0.0 , - 1.0 ],
262261 [- 2.0 , 1.0 , 0.0 ]]))
@@ -270,7 +269,7 @@ def test_matrix_exponent(self):
270269 m1 = rotate_matrix (rotate_matrix (rotate_matrix (
271270 np .eye (3 ), 0.2 , 'x' ), 0.4 , 'y' ), 0.6 , 'z' )
272271 testing .assert_almost_equal (
273- matrix_exponent ( matrix_log (m1 )), m1 ,
272+ axis_angle_vector_to_rotation_matrix ( rotation_matrix_to_axis_angle_vector (m1 )), m1 ,
274273 decimal = 5 )
275274
276275 def test_quaternion2matrix (self ):
0 commit comments