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 Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by