# 工业机器人（3）– Denavit–Hartenberg（D-H）参数

“Jacques Denavit and Richard Hartenberg introduced this convention in 1955 in order to standardize the coordinate frames for spatial linkages.”

D-H参数

D-H矩阵

Modified DH parameters

Matlab D-H法机器人建模

## D-H参数

where [T] is the transformation locating the end-link.

## Matlab D-H法机器人建模

MATLAB Robotics Toolbox ： https://www.mathworks.com/help/robotics/ug/check-for-environmental-collisions-with-manipulators.html

``````clear all;
clc;
% d_i连杆偏距：ai与ai-1两轴线公垂线之间的距离
% a_i连杆长度：ai-1与ai两关节轴线的公垂线方向上的距离
% alpha_i连杆转角：ai-1与ai两关节轴线投影的夹角
% theta_i关节角：ai关节动角度

L1 = Link('d', 1, 'a', 1, 'alpha', pi/2);
L2 = Link('d', 0, 'a', 1, 'alpha', 0,'offset',pi/2);
L3 = Link('d', 1, 'a', 0, 'alpha', pi/2,'offset',pi/4);
L4 = Link('d', 2, 'a', 0, 'alpha', -pi/2);
L5 = Link('d', 0, 'a', 0, 'alpha', pi/2);
L6 = Link('d', 1, 'a', 0, 'alpha', 0);
theta=[0 0 0 0 0 0];

theta1=[pi/4,-pi/3,pi/6,pi/4,-pi/3,pi/6];
p0=robot.fkine(theta);
p1=robot.fkine(theta1);
s=robot.A([4 5 6],theta);
cchain=robot.trchain;
q=robot.getpos();

q2=robot.ikine(p1);  %逆运动学
j0=robot.jacob0(q2);    %雅可比矩阵
``````

### 结果

Wiki 百科： https://en.wikipedia.org/wiki/Denavit%E2%80%93Hartenberg_parameters

MATLAB D-H ： https://blog.csdn.net/xuehuafeiwu123/article/details/52668916