1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| %连杆偏移 d1 = 152; d2 = 0; d3 = 0; d4 = 130; d5 = 102; d6 = 100; %连杆长度 a1 = 0; a2 = -425; a3 = -395; a4 = 0; a5 = 0; a6 = 0; %连杆扭角 alpha1 = pi/2; alpha2 = 0; alpha3 = 0; alpha4 = pi/2; alpha5 = -pi/2; alpha6 = 0; %由于我们需要分析各轴θi所对应的机器人末端位置 %因此theta1 theta2 theta3 theta4 theta5 theta6仍设为未知量 %syms theta1 theta2 theta3 theta4 theta5 theta6 % 参数矩阵取名为SDH theta1 = pi/3; theta2 = pi/4; theta3 = pi/5; theta4 = pi/3; theta5 = pi/4; theta6 = pi/5; SDH = [theta1 d1 a1 alpha1; theta2 d2 a2 alpha2; theta3 d3 a3 alpha3; theta4 d4 a4 alpha4; theta5 d5 a5 alpha5; theta6 d6 a6 alpha6]; T01=[cos(SDH(1,1)) -sin(SDH(1,1))*cos(SDH(1,4)) sin(SDH(1,1))*sin(SDH(1,4)) SDH(1,3)*cos(SDH(1,1)); sin(SDH(1,1)) cos(SDH(1,1))*cos(SDH(1,4)) -cos(SDH(1,1))*sin(SDH(1,4)) SDH(1,3)*sin(SDH(1,1)); 0 sin(SDH(1,4)) cos(SDH(1,4)) SDH(1,2); 0 0 0 1]; T12=[cos(SDH(2,1)) -sin(SDH(2,1))*cos(SDH(2,4)) sin(SDH(2,1))*sin(SDH(2,4)) SDH(2,3)*cos(SDH(2,1)); sin(SDH(2,1)) cos(SDH(2,1))*cos(SDH(2,4)) -cos(SDH(2,1))*sin(SDH(2,4)) SDH(2,3)*sin(SDH(2,1)); 0 sin(SDH(2,4)) cos(SDH(2,4)) SDH(2,2); 0 0 0 1]; T23=[cos(SDH(3,1)) -sin(SDH(3,1))*cos(SDH(3,4)) sin(SDH(3,1))*sin(SDH(3,4)) SDH(3,3)*cos(SDH(3,1)); sin(SDH(3,1)) cos(SDH(3,1))*cos(SDH(3,4)) -cos(SDH(3,1))*sin(SDH(3,4)) SDH(3,3)*sin(SDH(3,1)); 0 sin(SDH(3,4)) cos(SDH(3,4)) SDH(3,2); 0 0 0 1]; T34=[cos(SDH(4,1)) -sin(SDH(4,1))*cos(SDH(4,4)) sin(SDH(4,1))*sin(SDH(4,4)) SDH(4,3)*cos(SDH(4,1)); sin(SDH(4,1)) cos(SDH(4,1))*cos(SDH(4,4)) -cos(SDH(4,1))*sin(SDH(4,4)) SDH(4,3)*sin(SDH(4,1)); 0 sin(SDH(4,4)) cos(SDH(4,4)) SDH(4,2); 0 0 0 1]; T45=[cos(SDH(5,1)) -sin(SDH(5,1))*cos(SDH(5,4)) sin(SDH(5,1))*sin(SDH(5,4)) SDH(5,3)*cos(SDH(5,1)); sin(SDH(5,1)) cos(SDH(5,1))*cos(SDH(5,4)) -cos(SDH(5,1))*sin(SDH(5,4)) SDH(5,3)*sin(SDH(5,1)); 0 sin(SDH(5,4)) cos(SDH(5,4)) SDH(5,2); 0 0 0 1]; T56=[cos(SDH(6,1)) -sin(SDH(6,1))*cos(SDH(6,4)) sin(SDH(6,1))*sin(SDH(6,4)) SDH(6,3)*cos(SDH(6,1)); sin(SDH(6,1)) cos(SDH(6,1))*cos(SDH(6,4)) -cos(SDH(6,1))*sin(SDH(6,4)) SDH(6,3)*sin(SDH(6,1)); 0 sin(SDH(6,4)) cos(SDH(6,4)) SDH(6,2); 0 0 0 1]; T06 = T01*T12*T23*T34*T45*T56;
|