機械臂正運動學標準DH引數建立技巧
阿新 • • 發佈:2019-02-19
1. 切記,{i}座標系建立在i+1關節軸上,如{0}座標系建立在關節1軸上,依次類推。{6}座標系與{5}座標系姿態一致,固連在法蘭盤介面末端
2. 座標系原點建立:若1 2軸垂直或異面垂直,則座標系{1}原點在1軸與2軸的交點,{0}座標系原點建在1軸與2軸的交點上,若1 2軸平行,則建立在公垂線與軸的交點上。
3. z軸與關節軸方向一致,Xi軸與Zi-1軸垂直且相交,其中X0軸方向指向1 2軸公法線方向,y軸由右手定則確定。
4. 引數確定: a為兩Z軸距離,d為兩x軸距離;alpha為兩Z軸夾角,theta為兩x軸夾角,方向判斷如下圖:
5. 例項:
6. 正運動學標準DH引數matlab程式碼:
clear;
clc;
syms theta1 theta2 theta3 theta4 theta5 theta6;
syms alpha1 alpha2 alpha3 alpha4 alpha5 alpha6;
syms a1 a2 a3 a4 a5 a6;
syms d1 d2 d3 d4 d5 d6;
T1 = [cos(theta1), -sin(theta1)*cos(alpha1), sin(theta1)*sin(alpha1), a1*cos(theta1);...
sin(theta1), cos(theta1)*cos(alpha1), -cos(theta1)*sin(alpha1), a1*sin(theta1);...
0 , sin(alpha1), cos(alpha1), d1 ;...
0 , 0 , 0 , 1 ];
T2 = [cos(theta2), -sin(theta2)*cos(alpha2), sin(theta2)*sin(alpha2), a2*cos(theta2);...
sin(theta2), cos(theta2)*cos(alpha2), -cos(theta2)*sin(alpha2), a2*sin(theta2);...
0 , sin(alpha2), cos(alpha2), d2 ;...
0 , 0 , 0 , 1 ];
T3 = [cos(theta3), -sin(theta3)*cos(alpha3), sin(theta3)*sin(alpha3), a3*cos(theta3);...
sin(theta3), cos(theta3)*cos(alpha3), -cos(theta3)*sin(alpha3), a3*sin(theta3);...
0 , sin(alpha3), cos(alpha3), d3 ;...
0 , 0 , 0 , 1 ];
T4 = [cos(theta4), -sin(theta4)*cos(alpha4), sin(theta4)*sin(alpha4), a4*cos(theta4);...
sin(theta4), cos(theta4)*cos(alpha4), -cos(theta4)*sin(alpha4), a2*sin(theta4);...
0 , sin(alpha4), cos(alpha4), d4 ;...
0 , 0 , 0 , 1 ];
T5 = [cos(theta5), -sin(theta5)*cos(alpha5), sin(theta5)*sin(alpha5), a5*cos(theta5);...
sin(theta5), cos(theta5)*cos(alpha5), -cos(theta5)*sin(alpha5), a5*sin(theta5);...
0 , sin(alpha5), cos(alpha5), d5 ;...
0 , 0 , 0 , 1 ];
T6 = [cos(theta6), -sin(theta6)*cos(alpha6), sin(theta6)*sin(alpha6), a6*cos(theta6);...
sin(theta6), cos(theta6)*cos(alpha6), -cos(theta6)*sin(alpha6), a6*sin(theta6);...
0 , sin(alpha6), cos(alpha6), d6 ;...
0 , 0 , 0 , 1 ];
T = simplify(eval(T1*T2*T3*T4*T5*T6));
nx = T(1,1)
ny = T(2,1)
nz = T(3,1)
ox = T(1,2)
oy = T(2,2)
oz = T(2,3)
ax = T(1,3)
ay = T(2,3)
az = T(3,3)
px = T(1,4)
py = T(2,4)
pz = T(3,4)