Order of Rotation Matrices

조회 수: 3 (최근 30일)
Julia Williams
Julia Williams 2019년 8월 1일
편집: Julia Williams 2019년 8월 1일
I am having trouble with the translating coordinates in different reference frames. The tip of the finger is relative to the second knuckle which is relative to the first which is relative to the base of the finger. So far I have this code which transforms the coordinates I have given. I am trying to get all the coordinates relative to the same axis (the base of the finger). I am using rotation matrices generated from Euler Angles and am translating the coordinates as well but I am not getting the output i should. Please let me know if I should provide additional information! Thank you! Should I be premultiplying the coordinates by the matrices?
%eul2rotm is repeated for the rest of the joints
eultip = NewData(10+rowcounter,:);
eultip1 = [deg2rad(eultip(1)) deg2rad(eultip(2)) deg2rad(eultip(3))];
rotmtip = eul2rotm(eultip, 'XYZ');
%cascading rotation matrices
Lbase = (rotmbase)*(rotmpalm);
Lpalm1 = (rotm1)*(rotmbase)*(rotmpalm);
Lpalm2 = (rotm2)*(rotm1)*(rotmbase)*(rotmpalm);
Lpalmtip = (rotmtip)*(rotm2)*(rotm1)*(rotmbase)*(rotmpalm);
vectorbase = NewData(3+rowcounter,:);
indexbase = Lbase * transpose(vectorbase);
% this repeats with the rest of the fingers
vector1 = NewData(5+ rowcounter,:) - vectorbase;
indexknuckle1 = Lpalm1 * transpose(vector1);

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by