MATLAB Answers

Order of Rotation Matrices

조회 수: 3(최근 30일)
Julia Williams
Julia Williams 1 Aug 2019
편집: Julia Williams 1 Aug 2019
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

로그인 to comment.


이 질문에 답변하려면 로그인을(를) 수행하십시오.

Translated by