-1-PUMA机器人大作业1坐标系建立:坐标系可以简化为:-2-2D-H参数表:PUMA机器人的杆件参数:1d0.6604m,2d0.14909m,4d0.43307m,6d0.05625m,2a0.4318m,3a0.02032m关节iii1iaid运动范围190000-160o~160o20-9002d0.14909m-225o~45o3-9002a0.4318m0-45o~225o40-903a0.02032m4d0.43307m-110o~170o509000-100o~100o60-9006d0.05625m-266o~266o3正运动学推导由式111111111100001iiiiiiiiiiiiiiiiiiicsascccsdsTsscscdc可得:111101000000100001csscT,222122200001000001csdTsc,332332300000100001csascT443434440001000001csadTsc,554555000010000001csTsc,665666000010000001csTsc-3-00123456123456TTTTTTT机械手变换矩阵060001xxxxyyyyzzzznoapnoapTnoap23654164123651654164123654164123651654164123654642365()()()xyzncccccsscscscccssscsnccccssssscssccscsccnscccssccs23654164123651654164123654164123651645164123654642365()()()xyzocsccccscssscscssccsocsccscsssssssscccccossccssccs2354123515412354123515412352354xyzacsccsccsssacscsscssscaccssc3231221423121323122142312142332322xyzpaccaccdscdspacsacsdssdcpdcasas4逆运动学推导1.求1用逆变换011T左乘方程00123456123456TTTTTTT两边:010123451623456TTTTTTT1111160000001000010001xxxxyyyyzzzzcsnoapscnoapTnoap得112xyspcpd三角代换cosxp,sinyp-4-式中,22xypp,tan2(,)xyapp得到1的解222122atan2(,)atan2(,)yxxyppdppd2.求3矩阵方程两端的元素(1,4)和(2,4)分别对应相等113232242342332322xyzcpspacacdspdcasas平方和为:4333dsack其中2222222242322xyzpppddaaka解得:22233443atan2(,)atan2(,)adkdak3.求2在矩阵方程00123456123456TTTTTTT两边左乘逆变换013T。01034536456TTTTT1231232323123123232336112000010001xxxxyyyyzzzzccscsacnoapcssscasnoapTscdnoap方程两边的元素(1,4)和(3,4)分别对应相等,得123123233231231232323400xyzxyzccpscpspaaccspsspcpasd联立,得23s和23c2341123323221123311234232211xyzxyzxyzxyzasdcpsppacaspcpspacacpsppasdcpcpsp-5-23s和23c表达式的分母相等,且为正,于是23232341123323311234atan2,xyzxyzasdcpsppacaacacpsppasd根据解1和3的四种可能组合,可以得到相应的四种可能值23,于是可得到2的四种可能解2233式中2取与3相对应的值。4.求4令两边元素(1,3)和(2,3)分别对应相等,则可得12312323451145xyzxyccascasacssacass只要50s,便可求出441112312323atan2,xyxyzsacaccascasa当50s时,机械手处于奇异形位。5.求5010454656TTTT14231414231423434224434123144123142343422443461231232332400010001xxxxyyyyzzzzcccssscccsscccadscanoapsccscsscccsscsadcsanoapTcssscsadnoap根据矩阵两边元素(1,3)和(2,3)分别对应相等,可得2341423141423145123231235zxyxyzascacccssascccssacsassacc523414231414231412323123atan2,zxyxyzascacccssascccsacsassac6.求60105566TTT-6-根据矩阵两边元素(2,1)和(1,1)分别对应相等,可得142314412314234614523154152341523152341552345236xyzxyzncscscnsscccnsssnccccscscssncsccssssccnsccssc从而求得666atan2,sc5Matlab编程得出工作空间可以将连杆6的原点做为机器人的动点,连杆6原点相对于坐标系0就是06T的xp、yp、zp,已知:3231221423121323122142312142332322xyzpaccaccdscdspacsacsdssdcpdcasasMatlab程序如下:clc,clearlength2=431.8;length3=20.32;d2=149.09;d4=433.07;a=pi/180;fora1=-160*a:20*a:160*afora2=-225*a:20*a:45*aa3=-45*a:20*a:225*afork=1:length(a3)px(k)=cos(a1)*(length2*cos(a2)+length3*cos(a2+a3(k))-d4*sin(a2+a3(k)))-d2*sin(a1)py(k)=sin(a1)*(length2*cos(a2)+length3*cos(a2+a3(k))-d4*sin(a2+a3(k)))+d2*cos(a1)pz(k)=-a3(k)*sin(a2+a3(k))-length2*sin(a2)-d4*cos(a2+a3(k))endplot3(px,py,pz),title('机器人的工作空间'),xlabel('xmm'),ylabel('ymm'),zlabel('zmm')holdongridonendend机器人工作空间——三维空间:-7-