Code covered by the BSD License  

Highlights from
Task Space control of RPRP manipulator

image thumbnail
from Task Space control of RPRP manipulator by Sumit Tripathi
Forward and inverse kinematics of RPRP manipulator with task space control to trace trajectories.

f=my_zfun(x)
function f=my_zfun(x)

global theta1_g d1_g theta2_g d2_g;
global x_ee_g y_ee_g;

theta1_g = x(1);
theta2_g = x(2);

f1 = (d1_g*cos(theta1_g) + d2_g*cos(theta1_g+ theta2_g) - x_ee_g)^2;
f2 = (d1_g*sin(theta1_g) + d2_g*sin(theta1_g+ theta2_g) - y_ee_g)^2;
f = f1+f2;
return;

Contact us at files@mathworks.com