J = ccl_rob_jacobian (q,L) Jacobian calculation Input: q Joint state variable L Link length Output: J Jacobian
0001 function J = ccl_rob_jacobian (q, L) 0002 % J = ccl_rob_jacobian (q,L) 0003 % Jacobian calculation 0004 % Input: 0005 % q Joint state variable 0006 % L Link length 0007 % Output: 0008 % J Jacobian 0009 J(1,1) = -L(1)*sin(q(1,:)) - L(2)*sin(q(1,:)+q(2,:)) ; 0010 J(1,2) = - L(2)*sin(q(1,:)+q(2,:)) ; 0011 J(2,1) = L(1)*cos(q(1,:)) + L(2)*cos(q(1,:)+q(2,:)) ; 0012 J(2,2) = L(2)*cos(q(1,:)+q(2,:)) ; 0013 end