Converting differences of Euler Angles

조회 수: 6 (최근 30일)
Mary
Mary 2013년 3월 15일
Hi, I have a series of data points collected with the position (X, Y, Z) and orientation (RotZ, RotY, RotX). Just as I will be using the 3d distance formula to look at overall position differences between points, I'm looking to describe the overall orientation differences. How do I convert my Euler angle representation of orientation differences into overall rotational differences. (My coordinate axes are arbitrary, so I would prefer not to describe orientation changes as rotation about those axes.) Any help or suggestions for useful functions would be appreciated. Thanks in advance! - MG

답변 (1개)

Matt J
Matt J 2013년 3월 15일
편집: Matt J 2013년 3월 15일
You could convert your Euler angles to a rotation matrix R and then find the overall axis about which R rotates. This is given by the eigenvector of R with eigenvalue 1, e.g.,
>> R=Rz(45)*Rx(30)*Rz(20) %A rotation matrix based on z-x-z Euler angles
R =
0.4550 -0.8173 0.3536
0.8739 0.3336 -0.3536
0.1710 0.4698 0.8660
>> [V,D]=eig(R);
>> d=diag(D); [~,idx]=min(abs(d-1)); rotaxis = V(:,idx)
rotaxis =
0.4357
0.0966
0.8949
  댓글 수: 1
Matt J
Matt J 2013년 3월 15일
편집: Matt J 2013년 3월 15일
You can then also get the overall angle of rotation about rotaxis as follows
>> anglesep=@(a,b) atan2(norm(cross(a,b)),dot(a,b))*180/pi;
>> N=null(rotaxis');
>> rotangle = anglesep(R*N(:,1),N(:,1))
rotangle =
70.8938

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by