Empty sym: 0-by-1
Afficher commentaires plus anciens
What does it mean and why am I geting this? is there anyway to fix it?
%inverse kinematic given:[−320,30,−320] with respected to base frame
H=[0 0 1 -320;
0 -1 0 30;
1 0 0 -320;
0 0 0 1;]
t1 = 0; d1 = th1_; a1 = 0; alpha1 = 0;
t2 = th2_+pi; d2 = 0; a2 = L; alpha2 = 0;
t3 = th3_-pi/2;d3 = 0; a3 = L; alpha3= -pi/2;
t31 = 0; d31 =L; a31 = 0; alpha31 = 0;
t4 = 0;d4 = L+th4_;a4 =-L; alpha4 = pi;
t5 = th5_+pi;d5 = 0;a5 = L; alpha5 = pi/2;
t51 = pi/2; d51= L; a51 = 0; alpha51 = pi/2;
t52 = 0; d52 = L; a52 =0; alpha52 = 0;
t6 = th6_;d6 = L;a6 = 0; alpha6 = 0;
A_1_ = inTransMat(a_1,alpha_1,d_1,t_1);
A0_ = inTransMat(a0,alpha0,d0,t0);
%setting frame 0 as shown
A1 = inTransMat(a1,alpha1,d1,t1);
A2_ = inTransMat(a2,alpha2,d2,t2);
A3_ = inTransMat(a3,alpha3,d3,t3);
A31_= inTransMat (a31,alpha31,d31,t31);
A4_ = inTransMat(a4,alpha4,d4,t4);
A5_= inTransMat(a5,alpha5,d5,t5);
A51_= inTransMat (a51,alpha51,d51,t51);
A52_= inTransMat (a52,alpha52,d52,t52);
A6_= inTransMat(a6,alpha6,d6,t6);
T_ = A_1*A0*A1*A2_*A3_*A31*A4_*A5_*A51_*A52_*A6
T01_ = A_1*A0*A1;
T02_ = A_1*A0*A1*A2_;
T03_ = A_1*A0*A1*A2_*A3_*A31;
T04_ = A_1*A0*A1*A2_*A3_*A31*A4_;
T05_ = A_1*A0*A1*A2_*A3_*A4_*A5*A51_*A52_;
T_06= vpa(T_,2)
%alegrabi approach
eqn1= T_06(1,1)==H(1,1);
eqn2= T_06(1,2)==H(1,2);
eqn3= T_06(1,3)==H(1,3);
eqn4= T_06(1,4)==H(1,4);
eqn5= T_06(2,1)==H(2,1);
eqn6= T_06(2,2)==H(2,2);
eqn7= T_06(2,3)==H(2,3);
eqn8= T_06(2,4)==H(2,4);
eqn9= T_06(3,1)==H(3,2);
eqn10= T_06(3,2)==H(3,2);
eqn11= T_06(3,3)==H(3,3);
eqn12= T_06(3,4)==H(3,4);
sol = solve([eqn1, eqn2, eqn3,eqn4,eqn5,eqn6,eqn7,eqn8,eqn9,eqn10,eqn11,eqn12], [th1_, th2_, th3_, th4_,th5_,th6_]);
th1sol= sol.th1_
th2sol= sol.th2_
th3sol= sol.th3_
th4sol= sol.th4_
th5sol= sol.th5_
th6sol= sol.th6_
function IT = inTransMat(a,b,c,d)
IT = [cos(d) -sin(d)*cos(b) sin(d)*sin(b) a*cos(d); sin(d) cos(d)*cos(b) -cos(d)*sin(b) a*sin(d); 0 sin(b) cos(b) c; 0 0 0 1];
end
function T = TransMat(a,b,c,d)
T = [cos(d) -sin(d)*cos(b) sin(d)*sin(b) a*cos(d); sin(d) cos(d)*cos(b) -cos(d)*sin(b) a*sin(d); 0 sin(b) cos(b) c; 0 0 0 1];
end
1 commentaire
Surya Talluri
le 10 Août 2020
I understand that th1_, th2_, th3_, th4_, th5_, th6_, L are symbols. Can you give more information about any other symbols that you have defined and what is the value of a_1 in equation defined for A_1_?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!