Ask your own question, for FREE!
GT ECE 4560 - Intro to Automation & Robotics 27 Online
OpenStudy (anonymous):

In part d of the manipulator problem, we are asked to write a function for the forward kinematics routine in our code. I am unsure how to code this. I realize that ge = all the g times each other. The only thing I can think to do is to define each g and use the mtimes function. However, it says we are to use alpha, linklen, totip as our variables. Is there anywhere in past homework or notes that I can look to see similar examples of matlab code?

OpenStudy (anonymous):

The only thing I can think to do is to use the calculated formula for R and d of the Lynx6 manipulator that we solved for in HW#9: function g = forwardkin(alpha, linklen, totip) if (nargin == 1) totip = false; end R=[cos(alpha1)*cos(alpha5)-sin(alpha1)sin(alpha2+alpha3+alpha4)sin(alpha5), -cos(alpha1)*sin(alpha5)-sin(alpha1)*cos(alpha2 + alpha3 +alpha4)*cos(alpha5), sin(alpha1)*sin(alpha2+alpha3+alpha4); sin(alpha1)*cos(alpha5)+cos(alpha1)*cos(alpha2+alpha3+alpha4)*sin(alpha5), -sin(alpha1)*sin(alpha5)+cos(alpha1)*cos(alpha2+alpha3+alpha4)*cos(alpha5), cos(alpha1)*sin(alpha2+alpha3+alpha4); sin(alpha2+alpha3+alpha4)*cos(alpha5), sin(alpha2+alpha3+alpha4), cos(alpha2+alpha3+alpha4)]; d=[sin(alpha1)*(l1*sin(alpha2)+l2*sin(alpha2+alpha3)+(l3+l4)sin(a2+a3+a4)); -cos(a1)*(l1sin(a2)+l2sin(a2+a3)+(l3+l4)*sin(a2+a3+a4)); l0+l1*cos(a2)+l2*cos(a2+a3)+(l3+l4)cos(a2+a3+a4)]; If I allowed for alpha1, alpha2, alphan & linklen1, linklen2, linklenn inputs, then the function would calculate the forward kinematics.

OpenStudy (anonymous):

Here is the latest code I have found that may be helpful from HW#9 Problem 3: alpha1 = (-90:10:90) * pi()/180; alpha2 = (-180:10:180) * pi()/180; alpha3 = alpha4 = alpha5 = alpha1Cnt = numel(alpha1); alpha2Cnt = numel(alpha2); alpha3Cnt = nume1(alpha3); alpha4Cnt = nume1(alpha4); alpha5Cnt = nume1(alpha5); total = alpha1Cnt*alpha2Cnt+alpha3Cnt+alpha4Cnt+alpha5Cnt; x = zeros(1,total); y = zeros(1,total); theta = zeros(1,total); ll = 1; for ii=1:alpha1Cnt for jj=1:alpha2Cnt x(ll) = l1*cos(alpha1(ii))+l2*cos(alpha1(ii)+alpha2(jj)); y(ll) = l1*sin(alpha1(ii))+l2*sin(alpha1(ii)+alpha2(jj)); theta(ll) = alpha1(ii)+alpha2(jj); ll = ll+1; end end I added alpha3 - alpha5 as well as alpha3Cnt - alpha5Cnt, but I am stuck on what to add from there. I am unsure if this what we need to be doing, but it is the closest example I could find.

OpenStudy (anonymous):

Hmm this last thing you posted is just for graphing the workspace of the manipulator so that doesn't apply here. The first thing you said was that you need to multiply all the gs together. The gs depend on alphas and ls. So you can just make up each g separately and then multiply them to get the final answer. What you posted with the kinematics worked out already would probably work but it's much more complicated than it needs to be.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Austinsbabygirl4life: Texas schools look funn
2 hours ago 0 Replies 0 Medals
chuu: Is it (Hunt 30-31) or (Hunt 30-1) in MLA?
3 hours ago 0 Replies 0 Medals
luvnickk: what typa music yall listen to ?
3 hours ago 15 Replies 2 Medals
GothgirlLillian: Is music considered art?
3 hours ago 2 Replies 0 Medals
luvnickk: am newwww
7 hours ago 0 Replies 0 Medals
russianmafiya: can someone help me write a love song
8 hours ago 1 Reply 0 Medals
arrivhn: ADD ME ON DISCORD ICYAFFL
9 hours ago 4 Replies 1 Medal
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!