Ask your own question, for FREE!
GT ECE 4560 - Intro to Automation & Robotics 15 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
Mari103: How to pop out like a Jacc In the box
51 minutes ago 0 Replies 0 Medals
Breathless: Spooky witch but cute
7 hours ago 3 Replies 0 Medals
Arriyanalol: help
7 hours ago 10 Replies 2 Medals
Arriyanalol: @tinydinoUwU stop trying to find a argument u blad lil boy
1 day ago 5 Replies 4 Medals
Jaded012023: Please tell me what you all think of this song
10 hours ago 6 Replies 1 Medal
Arriyanalol: bro how
10 hours ago 2 Replies 3 Medals
Arriyanalol: cant wait for the new bluey movie in 2027
1 day ago 12 Replies 2 Medals
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!