参考:
1、机器人正逆运动学分析(ABB-IRB2600):https://blog.csdn.net/weixin_44266983/article/details/106159306
4、Matlab机器人工具箱机械手建模详解(同知乎):https://blog.csdn.net/u011661537/article/details/80397628
6、Matlab机器人工具箱(1)——机器人的建立、绘制与正逆运动学:https://blog.csdn.net/weixin_43502392/article/details/105447785
正文:
建立一个ABB-IRB2600运动学模型:通过两种方法,一种是使用Link函数,第二种方法是列出D-H参数表进行参数进行对照验证:
D-H表:
matlab代码:
-
-
%robot_test03.m
-
clear ; clc; close all;
-
d1 =
445;
-
d2 =
0;
-
d3 =
0;
-
d4 =
785;
-
d5 =
0;
-
d6 =
85;
-
-
a1 =
0;
-
a2 =
150;
-
a3 =
-700;
-
a4 =
-115;
-
a5 =
0;
-
a6 =
0;
-
-
alpha1 =
0 * pi;
-
alpha2 = (
-90/
180) * pi;
-
alpha3 = (
0/
180) * pi;
-
alpha4 = (
90/
180) * pi;
-
alpha5 = (
-90/
180) * pi;
-
alpha6 = (
90/
180) * pi;
-
% 机器人各连杆参数值
-
-
D=[d1,d2,d3,d4,d5,d6];
-
A=[a1,a2,a3,a4,a5,a6];
-
AlPHA=[alpha1,alpha2,alpha3,alpha4,alpha5,alpha6];
-
N = AlPHA(
2);
-
-
% 建立连杆DH参数(修正的DH)
-
L(
1)=Link([
0 D(
1) A(
1) AlPHA(
1)],
'modified'); L(
1).qlim=[-pi,pi];
-
L(
2)=Link([
0 D(
2) A(
2) AlPHA(
2)],
'modified'); L(
2).qlim=[pi/
8,pi*(
1
-0.2)];
-
% L(
2).offset = pi/
2;
-
L(
3)=Link([
0 D(
3) A(
3) AlPHA(
3)],
'modified'); L(
3).qlim=[-pi,pi];
-
L(
4)=Link([
0 D(
4) A(
4) AlPHA(
4)],
'modified'); L(
4).qlim=[-pi,pi];
-
L(
5)=Link([
0 D(
5) A(
5) AlPHA(
5)],
'modified'); L(
5).qlim=[-pi,pi];
-
L(
6)=Link([
0 D(
6) A(
6) AlPHA(
6)],
'modified'); L(
6).qlim=[-pi,pi];
-
-
T_sum = ChengABB_2600_fk(-pi/
2,pi/
2,pi/
3,pi/
4,pi/
5,pi/
6);
-
-
% 定义机器人
-
ABB_Cheng=SerialLink(L(
1:
6),
'name',
'ABB-IRB2600');
-
ABB_Cheng.tool = transl(
0,
0,
100);
-
ABB_Cheng.teach();
-
T0_6 = ABB_Cheng.fkine([-pi/
2 pi/
2 pi/
3 pi/
4 pi/
5 pi/
6]);
-
-
%ChengABB_2600_fk.m
-
function T06 = ChengABB_2600_fk(theta1,theta2,theta3,theta4,theta5,theta6)
-
%UNTITLED4 此处显示有关此函数的摘要
-
% 此处显示详细说明
-
d1 =
445;
-
d2 =
0;
-
d3 =
0;
-
d4 =
785;
-
d5 =
0;
-
d6 =
85;
-
-
a1 =
0;
-
a2 =
150;
-
a3 =
-700;
-
a4 =
-115;
-
a5 =
0;
-
a6 =
0;
-
-
alpha1 =
0 * pi;
-
alpha2 = (
-90/
180) * pi;
-
alpha3 = (
0/
180) * pi;
-
alpha4 = (
90/
180) * pi;
-
alpha5 = (
-90/
180) * pi;
-
alpha6 = (
90/
180) * pi;
-
% GenT(theta_i,alpha_1i,a_1i,d_i)
-
% theta_i,alpha_i
-1,a_i
-1,d_i
-
function T = GenT(theta_i,alpha_1i,a_1i,d_i)
-
%UNTITLED4 此处显示有关此函数的摘要
-
T = [
cos(theta_i) -
sin(theta_i)
0 a_1i;
-
sin(theta_i)*
cos(alpha_1i)
cos(theta_i)*
cos(alpha_1i) -
sin(alpha_1i) -
sin(alpha_1i)*d_i;
-
sin(theta_i)*
sin(alpha_1i)
cos(theta_i)*
sin(alpha_1i)
cos(alpha_1i)
cos(alpha_1i)*d_i;
-
0
0
0
1 ];
-
end
-
T01 = GenT(theta1,alpha1,a1,d1);
-
-
T12 = GenT(theta2,alpha2,a2,d2);
-
-
T23 = GenT(theta3,alpha3,a3,d3);
-
-
T34 = GenT(theta4,alpha4,a4,d4);
-
-
T45 = GenT(theta5,alpha5,a5,d5);
-
-
T56 = GenT(theta6,alpha6,a6,d6);
-
-
T06 = T01*T12*T23*T34*T45*T56;
-
-
end
结果比对:
使用机器人工具箱求运动学模型结果:
使用自己写转换矩阵进行运动学模型的建立:
大家可以看到,转换矩阵确实一样。
转载:https://blog.csdn.net/weixin_42208807/article/details/116458259
查看评论