飞道的博客

【Matlab——机器人工具箱——学习笔记】六轴协作机器人运动学模型01

302人阅读  评论(0)

参考:

1、机器人正逆运动学分析(ABB-IRB2600):https://blog.csdn.net/weixin_44266983/article/details/106159306

2、Matlab机器人工具箱(番外篇)———机器人建立的任意方法:https://blog.csdn.net/weixin_43502392/article/details/105654578?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522162027315016780265488838%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=162027315016780265488838&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_v2~rank_v29-13-105654578.first_rank_v2_pc_rank_v29&utm_term=matlab%E6%9C%BA%E5%99%A8%E4%BA%BA%E5%B7%A5%E5%85%B7%E7%AE%B1%E5%B9%B3%E7%A7%BB%E5%85%B3%E8%8A%82

3、MATLAB机器人工具箱【1】——建模+正逆运动学+雅克比矩阵:https://blog.csdn.net/huangjunsheng123/article/details/110630665?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522162019885916780357239484%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=162019885916780357239484&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-110630665.first_rank_v2_pc_rank_v29&utm_term=matlab%E6%9C%BA%E5%99%A8%E4%BA%BA%E5%B7%A5%E5%85%B7%E7%AE%B1%E6%AD%A3%E9%80%86%E8%BF%90%E5%8A%A8%E5%AD%A6

4、Matlab机器人工具箱机械手建模详解(同知乎):https://blog.csdn.net/u011661537/article/details/80397628

5、详细介绍如何使用MATLAB中的机器人工具箱建立机器人模型(DH法建模)(机械臂):https://blog.csdn.net/qq_44339029/article/details/109708454?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522162028887416780264099691%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=162028887416780264099691&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_v2~rank_v29-20-109708454.first_rank_v2_pc_rank_v29&utm_term=matlab%E6%9C%BA%E5%99%A8%E4%BA%BA%E5%B7%A5%E5%85%B7%E7%A7%BB%E5%8A%A8

 6、Matlab机器人工具箱(1)——机器人的建立、绘制与正逆运动学:https://blog.csdn.net/weixin_43502392/article/details/105447785

正文:

建立一个ABB-IRB2600运动学模型:通过两种方法,一种是使用Link函数,第二种方法是列出D-H参数表进行参数进行对照验证:

 

D-H表:

matlab代码:


  
  1. %robot_test03.m
  2. clear ; clc; close all;
  3. d1 = 445;
  4. d2 = 0;
  5. d3 = 0;
  6. d4 = 785;
  7. d5 = 0;
  8. d6 = 85;
  9. a1 = 0;
  10. a2 = 150;
  11. a3 = -700;
  12. a4 = -115;
  13. a5 = 0;
  14. a6 = 0;
  15. alpha1 = 0 * pi;
  16. alpha2 = ( -90/ 180) * pi;
  17. alpha3 = ( 0/ 180) * pi;
  18. alpha4 = ( 90/ 180) * pi;
  19. alpha5 = ( -90/ 180) * pi;
  20. alpha6 = ( 90/ 180) * pi;
  21. % 机器人各连杆参数值
  22. D=[d1,d2,d3,d4,d5,d6];
  23. A=[a1,a2,a3,a4,a5,a6];
  24. AlPHA=[alpha1,alpha2,alpha3,alpha4,alpha5,alpha6];
  25. N = AlPHA( 2);
  26. % 建立连杆DH参数(修正的DH)
  27. L( 1)=Link([ 0 D( 1) A( 1) AlPHA( 1)], 'modified'); L( 1).qlim=[-pi,pi];
  28. L( 2)=Link([ 0 D( 2) A( 2) AlPHA( 2)], 'modified'); L( 2).qlim=[pi/ 8,pi*( 1 -0.2)];
  29. % L( 2).offset = pi/ 2;
  30. L( 3)=Link([ 0 D( 3) A( 3) AlPHA( 3)], 'modified'); L( 3).qlim=[-pi,pi];
  31. L( 4)=Link([ 0 D( 4) A( 4) AlPHA( 4)], 'modified'); L( 4).qlim=[-pi,pi];
  32. L( 5)=Link([ 0 D( 5) A( 5) AlPHA( 5)], 'modified'); L( 5).qlim=[-pi,pi];
  33. L( 6)=Link([ 0 D( 6) A( 6) AlPHA( 6)], 'modified'); L( 6).qlim=[-pi,pi];
  34. T_sum = ChengABB_2600_fk(-pi/ 2,pi/ 2,pi/ 3,pi/ 4,pi/ 5,pi/ 6);
  35. % 定义机器人
  36. ABB_Cheng=SerialLink(L( 1: 6), 'name', 'ABB-IRB2600');
  37. ABB_Cheng.tool = transl( 0, 0, 100);
  38. ABB_Cheng.teach();
  39. T0_6 = ABB_Cheng.fkine([-pi/ 2 pi/ 2 pi/ 3 pi/ 4 pi/ 5 pi/ 6]);

 


  
  1. %ChengABB_2600_fk.m
  2. function T06 = ChengABB_2600_fk(theta1,theta2,theta3,theta4,theta5,theta6)
  3. %UNTITLED4 此处显示有关此函数的摘要
  4. % 此处显示详细说明
  5. d1 = 445;
  6. d2 = 0;
  7. d3 = 0;
  8. d4 = 785;
  9. d5 = 0;
  10. d6 = 85;
  11. a1 = 0;
  12. a2 = 150;
  13. a3 = -700;
  14. a4 = -115;
  15. a5 = 0;
  16. a6 = 0;
  17. alpha1 = 0 * pi;
  18. alpha2 = ( -90/ 180) * pi;
  19. alpha3 = ( 0/ 180) * pi;
  20. alpha4 = ( 90/ 180) * pi;
  21. alpha5 = ( -90/ 180) * pi;
  22. alpha6 = ( 90/ 180) * pi;
  23. % GenT(theta_i,alpha_1i,a_1i,d_i)
  24. % theta_i,alpha_i -1,a_i -1,d_i
  25. function T = GenT(theta_i,alpha_1i,a_1i,d_i)
  26. %UNTITLED4 此处显示有关此函数的摘要
  27. T = [ cos(theta_i) - sin(theta_i) 0 a_1i;
  28. sin(theta_i)* cos(alpha_1i) cos(theta_i)* cos(alpha_1i) - sin(alpha_1i) - sin(alpha_1i)*d_i;
  29. sin(theta_i)* sin(alpha_1i) cos(theta_i)* sin(alpha_1i) cos(alpha_1i) cos(alpha_1i)*d_i;
  30. 0 0 0 1 ];
  31. end
  32. T01 = GenT(theta1,alpha1,a1,d1);
  33. T12 = GenT(theta2,alpha2,a2,d2);
  34. T23 = GenT(theta3,alpha3,a3,d3);
  35. T34 = GenT(theta4,alpha4,a4,d4);
  36. T45 = GenT(theta5,alpha5,a5,d5);
  37. T56 = GenT(theta6,alpha6,a6,d6);
  38. T06 = T01*T12*T23*T34*T45*T56;
  39. end

 

结果比对:

使用机器人工具箱求运动学模型结果:

使用自己写转换矩阵进行运动学模型的建立:

大家可以看到,转换矩阵确实一样。

 

 

 

 

 

 

 


转载:https://blog.csdn.net/weixin_42208807/article/details/116458259
查看评论
* 以上用户言论只代表其个人观点,不代表本网站的观点或立场