旋转矩阵是酉矩阵, 满足 R*R^(T) = I
r = [0.212 0.7743 0.5963; 0.212 -0.6321 0.7454;0.9540 -0.0316 -0.2981];
r*r' =
1.0001 -0.0000 0.0000
-0.0000 1.0001 0.0000
0.0000 0.0000 1.0000
所以第一个是对的
r = [2^(0.5)/2, 0, 2^(0.5)/2;0,1,0;-2^(0.5)/2, 0, 2^(0.5)/2];
r*r'
ans =
1.0000 0 0
0 1.0000 0
0 0 1.0000
第二个也是对的
第三个是二维的旋转矩阵,满足要求。
第四个元素中出现绝对值大于1的元素不符合要求。
创建函数:
function [ mat ] = getRzyz( thetaZ1, thetaY, thetaZ2 ) %UNTITLED Summary of this function goes here % Detailed explanation goes here mat1 = [cos(thetaZ1), -sin(thetaZ1), 0; sin(thetaZ1), cos(thetaZ1), 0; 0, 0, 1]; mat2 = [cos(thetaY), 0, -sin(thetaY); 0,1,0; sin(thetaY), 0, cos(thetaY)]; mat3 = [cos(thetaZ2), -sin(thetaZ2), 0; sin(thetaZ2), cos(thetaZ2), 0; 0, 0, 1]; mat = mat1*mat2*mat3; endgetRzyz(0.2,0.1,0.6)符合
根据:
计算
omega_b = [0,-1,0.9689;1,0,-0.2474;-0.9689,0.2474,0]
r = [0.675,-0.1724,0.7174;0.2474,0.9689,0;-0.6951,0.1775,0.6967]
r_dot = r*omega_b
omega_s = r_dot*r'
0 -0.6967 1.0000
0.6967 0 -0.7174
-1.0000 0.7174 0.0000
角度固定在了[0,pi]之间,那么除了特例的情况下,是有解的
r = [0.2919,0.643,-0.7081;-0.643, -0.4161, -0.643;-0.7081, 0.643, 0.2919]
trace(r) = 0.1677;
acos((trace(r)-1)*0.5)
2.0
0.5/sin(2)*(r-r')
ans =
0 0.7071 0
-0.7071 0 -0.7071
0 0.7071 0
u = [0.7071, 0, -0.7071]
trace(r) = -1;
cos(theta) = (-1-1)/2 = -1
theta = pi;
转轴 为u或是-u
没有唯一解