Im just here for some help, i tried to use the same ikcon function but it returns this error.
--------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
I have confirmed that my matlab license has Optimization Toolbox on it using ver. I was wondering if you can help me by running my code to confirm that it works.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
%ForeLimb
%L3 = Link('a', 0.0203, 'qlim', [pi/2 1]);
L(1) = Link('d',0,'a', 1.7 ,'qlim',[1.2 pi/2]);
L(2) = Link('d',0,'a', 1.8 ,'qlim',[0.5 1.1]);
L(3) = Link('d',0,'a', 2.5 ,'qlim',[-0.3 -1.4]);
L(4) = Link('d',0,'a', 2.0 ,'qlim',[0 2.6]);
L(5) = Link('d',0,'a', 1.0 ,'qlim',[-0 2.6]);
Fore = SerialLink(L)
Fore.name = 'Forelimb'
q0 = [1.204 0.751 -.977 0.139 -0.157];
q1 = [1.274 1.065 -.855 0.069 -0.628];
q2 = [pi/2 0.698 -.349 0.279 -0.75];
q3 = [1.466 0.7853 -0.8377 0.9250 0.4014];
q4 = [1.222 0.9425 -1.361 0.977 0.995];
t=0:.03:2;%Time vector & steps
traj1 = jtraj(q0,q1,t);
traj2 = jtraj(q1,q2,t);
traj3 = jtraj(q2,q3,t);
traj4 = jtraj(q3,q4,t);
traj5 = jtraj(q4,q0,t);
Fore.plot(traj1);
Fore.plot(traj2);
Fore.plot(traj3);
Fore.plot(traj4);
Fore.plot(traj5);
%Fore.plot([1.466 0.7853 -0.8377 0.9250 0.4014])
T0 = Fore.fkine(q0);
T1 = Fore.fkine(q1);
T2 = Fore.fkine(q2);
T3 = Fore.fkine(q3);
T4 = Fore.fkine(q4);
%inv = Fore.ikine(T,'mask', [1 1 1 1 1])
%figure
%Fore.plot(inv)
q12 = [1.274 1.065 -.855 0.069 -0.628];
Q0 = Fore.ikcon(T0,q12);
Q1 = Fore.ikcon(T1,q12);
Q2 = Fore.ikcon(T2,q12);
Q3 = Fore.ikcon(T3,q12);
Q4 = Fore.ikcon(T4,q12);
Q02 = [1.222 0.9425 -1.361 0.977 0.995];
t=0:0.03:2;%Time vector & steps
Traj1 = jtraj(Q,Q1,t);
Traj2 = jtraj(Q1,Q2,t);
Traj3 = jtraj(Q2,Q3,t);
Traj4 = jtraj(Q3,Q2,t);
Traj5 = jtraj(Q2,Q,t);
figure(2)
Fore.plot(Traj1);
Fore.plot(Traj2);
Fore.plot(Traj3);
Fore.plot(Traj4);
Fore.plot(Traj5);