当前位置:   article > 正文

4、matlab串联机械臂工作空间计算_用matlab求机械臂的工作空间

用matlab求机械臂的工作空间

1.1、模型

  1. %机械臂为六自由度机械臂
  2. clear L;
  3. %角度转换
  4. du=pi/180; %度
  5. radian=180/pi; %弧度
  6. %关节长度
  7. L1=4.324;L2=16;L3=2.35;L4=16.085;L5=14.675;
  8. %% 字符串法建立模型,
  9. q0=0;L0=0;%过渡关节
  10. % hand = 'Rz(q1).Tz(L1).Ry(q2).Tz(L2).Ry(q3).Tz(L3).Rx(q4).Tx(L4).Ry(q5).Rz(q6).Tz(L5)';
  11. % dhand = DHFactor(hand)
  12. % six_hand =eval(dhand.command('hand'));
  13. plotopt = {'noraise', 'nowrist', 'nojaxes', 'delay',0};
  14. % tool_dh=[1 0 0 0;
  15. % 0 1 0 0;
  16. % 0 0 1 0;
  17. % 0 0 0 1];
  18. % six_hand_link=SerialLink(six_hand,'name','six hand','tool',tool_dh)
  19. %% DH法建立模型,关节角,连杆偏移,连杆长度,连杆扭转角,关节类型(0转动,1移动)
  20. L(1) = Link( 'd',L1 , 'a',0, 'alpha',-pi/2, 'offset',0 );
  21. L(2) = Link( 'd',0 , 'a',-L2, 'alpha',0 , 'offset',pi/2);
  22. L(3) = Link( 'd',0 , 'a',-L3, 'alpha',pi/2 , 'offset',0 );
  23. L(4) = Link( 'd',L4 , 'a',0 , 'alpha',-pi/2, 'offset',0 );
  24. L(5) = Link( 'd',0 , 'a',0, 'alpha',pi/2 , 'offset',pi/2);
  25. L(6) = Link( 'd',L5 , 'a',0, 'alpha',0 , 'offset',0 );
  26. tool_char=[ 1 0 0 0;
  27. 0 1 0 0;
  28. 0 0 1 0;
  29. 0 0 0 1];
  30. six_link=SerialLink(L,'name','six link','tool',tool_char);
  31. %显示机械臂
  32. figure(1)
  33. hold on
  34. %six_li
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/993223
推荐阅读
相关标签
  

闽ICP备14008679号