Order of Rotation Matrices

3 views (last 30 days)
Julia Williams
Julia Williams on 1 Aug 2019
Edited: Julia Williams on 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);

Answers (0)

Community Treasure Hunt

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

Start Hunting!