引言
重新复习了一下机器人学DH参数,并且利用matlab符号运算进行了推导,验证了公式。

图中的坐标系定义:
利用连杆坐标系定义相应的连杆参数:
坐标系 { i } \{i\} {i}相对坐标系 { i − 1 } \{i-1\} {i−1}的变换矩阵 i − 1 T i {}^{i-1}T_{i} i−1Ti可以看作四个子变换矩阵的乘积:
这些变换都是相对运动坐标系描述的,满足从左到右的原则,可以得到最终变换公式如下:
i
i
−
1
T
=
R
o
t
x
(
α
i
)
T
r
a
n
s
x
(
a
i
)
R
o
t
z
(
θ
i
)
T
r
a
n
s
z
(
d
i
)
_{i}^{i-1}T=R o t_{x}\left(\alpha_{i}\right)T r a n s_{x}\left(a_{i}\right)R o t_{z}\left(\theta_{i}\right)T r a n s_{z}\left(d_{i}\right)
ii−1T=Rotx(αi)Transx(ai)Rotz(θi)Transz(di)
通常规定
a
i
≥
0
a_i\ge0
ai≥0,因为它代表连杆长度,而
α
i
,
d
i
,
θ
i
\alpha_i, d_i, \theta_i
αi,di,θi可正可负。
i
i
−
1
T
=
[
c
o
s
θ
i
−
s
i
n
θ
i
0
a
i
−
1
s
i
n
θ
i
c
o
s
α
i
−
1
c
o
s
θ
i
c
o
s
α
i
−
1
−
s
i
n
α
i
−
1
−
d
i
s
i
n
α
i
−
1
s
i
n
θ
i
s
i
n
α
i
−
1
c
o
s
θ
i
s
i
n
α
i
−
1
c
o
s
α
i
−
1
d
i
c
o
s
α
i
−
1
0
0
0
1
]
_{i}^{i-1}T=[cosθi−sinθi0ai−1sinθicosαi−1cosθicosαi−1−sinαi−1−disinαi−1sinθisinαi−1cosθisinαi−1cosαi−1dicosαi−10001]
利用Matlab的符号运算进行公式推导进行一下公式的验证
syms theta d alpha a
M=DH_Trans(theta,d,alpha,a)
function M=DH_Trans(theta,d,alpha,a)
R_z_theta=[cos(theta),-sin(theta),0,0;...
sin(theta),cos(theta),0,0;...
0,0,1,0;...
0,0,0,1];
T_z_d=[1,0,0,0;...
0,1,0,0;...
0,0,1,d;...
0,0,0,1];
R_x_alpha=[1,0,0,0;...
0,cos(alpha),-sin(alpha),0;...
0,sin(alpha),cos(alpha),0;...
0,0,0,1];
T_x_a=[1,0,0,a;...
0,1,0,0;...
0,0,1,0;...
0,0,0,1];
M=R_x_alpha*T_x_a*R_z_theta*T_z_d;
end
结果是一致的
