工业六轴机器人常见的MOD(改进)-DH模型建立方法


一、M-DH模型

在这里插入图片描述
在这里插入图片描述

二、形式1

clear;clc;close all;
%杆长参数设置
L1=160;L2=449.5;L3=580;L4=200;L5=640;L6=228;
%        theta(z)   d(z)     a(x)     alpha(x)  
RL1=Link([  0       L2       0        0       ],'modified');
RL2=Link([  0       0        L1       -pi/2   ],'modified');RL2.offset=-pi/2;
RL3=Link([  0       0        L3       0       ],'modified');
RL4=Link([  0       L5       L4       -pi/2   ],'modified');
RL5=Link([  0       0        0        pi/2    ],'modified');
RL6=Link([  0       L6       0        -pi/2   ],'modified');
Robot_6=SerialLink([RL1,RL2,RL3,RL4,RL5,RL6],'name','Robot');
Robot_6.teach;

运行结果:
在这里插入图片描述

三、形式2

L1=160;L2=449.5;L3=580;L4=200;L5=640;L6=228;
RL1=Link('revolute','d',L2,'a',0,'alpha',0,'modified');
RL2=Link('revolute','d',0,'a',L1,'alpha',-pi/2,'modified');RL2.offset=-pi/2;
RL3=Link('revolute','d',0,'a',L3,'alpha',0,'modified');
RL4=Link('revolute','d',L5,'a',L4,'alpha',-pi/2,'modified');
RL5=Link('revolute','d',0,'a',0,'alpha',pi/2,'modified');
RL6=Link('revolute','d',L6,'a',0,'alpha',-pi/2,'modified');
Robot_6=SerialLink([RL1,RL2,RL3,RL4,RL5,RL6],'name','Robot');
Robot_6.teach;

运行结果:
在这里插入图片描述

四、形式3

L1=160;L2=449.5;L3=580;L4=200;L5=640;L6=228;
w1=0;w2=0;w3=0;w4=0;w5=0;w6=0;
%Tz(L2)*Rz
T01=[1 0 0 0;0 1 0 0;0 0 1 L2;0 0 0 1]*...
    [cos(w1) -sin(w1) 0 0;sin(w1) cos(w1) 0 0;0 0 1 0;0 0 0 1];
%Rx(-pi/2)*Tx(L1)*Rz(-pi/2)*Rz
T12=[1 0 0 0;0 cos(-pi/2) -sin(-pi/2) 0;0 sin(-pi/2) cos(-pi/2) 0;0 0 0 1]*...
    [1 0 0 L1;0 1 0 0;0 0 1 0;0 0 0 1]*...
    [cos(-pi/2) -sin(-pi/2) 0 0;sin(-pi/2) cos(-pi/2) 0 0;0 0 1 0;0 0 0 1]*...
    [cos(w2) -sin(w2) 0 0;sin(w2) cos(w2) 0 0;0 0 1 0;0 0 0 1];
%Tx(L3)*Rz
T23=[1 0 0 L3;0 1 0 0;0 0 1 0;0 0 0 1]*...
    [cos(w3) -sin(w3) 0 0;sin(w3) cos(w3) 0 0;0 0 1 0;0 0 0 1];
%Rx(-pi/2)*Tx(L4)*Tz(L5)*Rz
T34=[1 0 0 0;0 cos(-pi/2) -sin(-pi/2) 0;0 sin(-pi/2) cos(-pi/2) 0;0 0 0 1]*...
    [1 0 0 L4;0 1 0 0;0 0 1 L5;0 0 0 1]*...
    [cos(w4) -sin(w4) 0 0;sin(w4) cos(w4) 0 0;0 0 1 0;0 0 0 1];
%Rx(pi/2)*Rz
T45=[1 0 0 0;0 cos(pi/2) -sin(pi/2) 0;0 sin(pi/2) cos(pi/2) 0;0 0 0 1]*...
    [cos(w5) -sin(w5) 0 0;sin(w5) cos(w5) 0 0;0 0 1 0;0 0 0 1];
%Rx(-pi/2)*Tz(L6)*Rz
T56=[1 0 0 0;0 cos(-pi/2) -sin(-pi/2) 0;0 sin(-pi/2) cos(-pi/2) 0;0 0 0 1]*...
    [1 0 0 0;0 1 0 0;0 0 1 L6;0 0 0 1]*...
    [cos(w6) -sin(w6) 0 0;sin(w6) cos(w6) 0 0;0 0 1 0;0 0 0 1];
T06=T01*T12*T23*T34*T45*T56

运行结果:

T06 =

   1.0e+03 *

    0.0000    0.0000    0.0010    1.0280
   -0.0000   -0.0010    0.0000    0.0000
    0.0010   -0.0000   -0.0000    1.2295
         0         0         0    0.0010

  • 10
    点赞
  • 57
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 11
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Vittore-Li

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值