Info

This question is closed. Reopen it to edit or answer.

why the orientation of the frame is different ?

1 view (last 30 days)
siti khadijah binti
siti khadijah binti on 14 Jul 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
Hai all :),
I am Siti. I have a question here and hope anyone can explain to me why this happen :)
I am using a DH convention for forward kinematics and I used Matlab to calculate it.
here is my code
if true
% code
function case1 = upperlimbcase1(theta1,,alpha1,a1,d1)
theta1rad = theta1*pi/180;
alpha1rad = alpha1*pi/180;
link1 = [cos(theta1rad) -sin(theta1rad)*cos(alpha1rad) sin(theta1rad)*sin(alpha1rad) a1*cos(theta1rad);
sin(theta1rad) cos(theta1rad)*cos(alpha1rad) -cos(theta1rad)*sin(alpha1rad) a1*sin(theta1rad);
0 sin(alpha1rad) cos(alpha1rad) d1;
0 0 0 1;]
end
and here is the result after rotate the frames at 90 degrees about z-axis.
if true
% code
link1 =
0.0000 -1.0000 0 0.0000
1.0000 0.0000 0 3.0634
0 0 1.0000 0
0 0 0 1.0000
end
I try to stimulate it using Simmechanics. However, the frame's rotation is different when I set the orientation vector to be [0 0 90] and [0 1 0; -1 0 0; 0 0 1].
May anyone here, explain why this happen. I expecting that for both cases, the orientation should be same. Is there anything that I miss?
Thank you in advance :)
Regards, Siti

Answers (0)

Community Treasure Hunt

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

Start Hunting!