r = ccl_rob_forward (q,L) Forward kinematic simulation Input: q Joint state variable L Link length Output: r Task space variable
0001 function r = ccl_rob_forward (q, L) 0002 % r = ccl_rob_forward (q,L) 0003 % Forward kinematic simulation 0004 % Input: 0005 % q Joint state variable 0006 % L Link length 0007 % Output: 0008 % r Task space variable 0009 r = zeros(2,1) ; 0010 r(1) = L(1)*cos(q(1,:)) + L(2)*cos(q(1,:)+q(2,:)) ; 0011 r(2) = L(1)*sin(q(1,:)) + L(2)*sin(q(1,:)+q(2,:)) ; 0012 end