我有两个不同的旋转矩阵,当将它们点积为向量时,我得到了相同的结果。这是什么意思?
这里是旋转矩阵和向量
vec = [-7.74299796, 7.28526622, 9.15009209]
rot_mat1 = [[ 0.39713126, 0.85165074, -0.34202014],
[-0.81079831, 0.15097003, -0.56552114],
[-0.4299917 , 0.50189548, 0.7504719 ]]
rot_mat2 = [[ 0.82343558, 0.21636871, 0.52453639],
[ 0.0429524 , 0.89801831, -0.43785637],
[-0.56578171, 0.38307661, 0.73016667]]
结果
[ 0., 2.203296, 13.852754]
结果不一样:
import numpy as np
vec = np.array([-7.74299796, 7.28526622, 9.15009209])
rot_mat1 = np.array([
[0.39713126, 0.85165074, -0.34202014],
[-0.81079831, 0.15097003, -0.56552114],
[-0.4299917, 0.50189548, 0.7504719]
])
rot_mat2 = np.array([
[0.82343558, 0.21636871, 0.52453639],
[0.0429524, 0.89801831, -0.43785637],
[-0.56578171, 0.38307661, 0.73016667]
])
result1 = np.dot(rot_mat1, vec)
result2 = np.dot(rot_mat2, vec)
print("Result from rot_mat1:", result1)
print("Result from rot_mat2:", result2)
退货者
Result from rot_mat1: [5.36930799e-08 2.20329601e+00 1.38527540e+01]
Result from rot_mat2: [-8.90472861e-08 2.20329601e+00 1.38527540e+01]