MATLAB机器人仿真程序_第1页
MATLAB机器人仿真程序_第2页
MATLAB机器人仿真程序_第3页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、附录MATLAB 机器人工具箱仿真程序:1) 运动学仿真模型程序( Rob1.m)L1=link(pi/2 150 0 0)L2=link(0 570 0 0)L3=link(pi/2 130 0 0)L4=link(-pi/2 0 0 640)L5=link(pi/2 0 0 0)L6=link(0 0 0 95)r=robot(L1 L2 L3 L4 L5 L6)= ' MOTOMAN-UP'6 % 模型的名称>>drivebot(r)2) 正运动学仿真程序 (Rob2.m) L1=link(pi/2 150 0 0)L2=link(0 570 0

2、0) L3=link(pi/2 130 0 0) L4=link(-pi/2 0 0 640) L5=link(pi/2 0 0 0) L6=link(0 0 0 95) r=robot(L1 L2 L3 L4 L5 L6) = ' MOTOMAN-UP'6 t=0:0.01:10;% 产生时间向量 qA=0 0 0 0 0 0 ; %机械手初始关节角度机械手终止关节角度');% 给仿真图像命名qAB=-pi/2 -pi/3 0 pi/6 pi/3 pi/2 ;% figure('Name','up6 机器人正运动学仿真演示 q=jt

3、raj(qA,qAB,t);% 生成关节运动轨迹 T=fkine(r,q);% 正向运动学仿真函数 plot(r,q);% 生成机器人的运动figure('Name','up6 机器人末端位移图 ' ) subplot(3,1,1);plot(t, squeeze(T(1,4,:); xlabel('Time (s)'); ylabel('X (m)');subplot(3,1,2); plot(t, squeeze(T(2,4,:); xlabel('Time (s)'); ylabel('Y (m)&#

4、39;);subplot(3,1,3); plot(t, squeeze(T(3,4,:); xlabel('Time (s)'); ylabel('Z (m)');x=squeeze(T(1,4,:); y=squeeze(T(2,4,:); z=squeeze(T(3,4,:);figure('Name','up6 机器人末端轨迹图 '); plot3(x,y,z);3) 机器人各关节转动角度仿真程序: (Rob3.m) L1=link(pi/2 150 0 0 )L2=link(0 570 0 0) L3=link(pi/2

5、 130 0 0)L4=link(-pi/2 0 0 640) L5=link(pi/2 0 0 0 ) L6=link(0 0 0 95) r=robot(L1 L2 L3 L4 L5 L6) ='motoman-up6' t=0:0.01:10;qA=0 0 0 0 0 0 ;qAB= pi/6 pi/6 pi/6 pi/6 pi/6 pi/6; q=jtraj(qA,qAB,t);Plot(r,q); subplot(6,1,1);plot(t,q(:,1);title(' 转动关节 1'); xlabel(' 时间 /s');

6、 ylabel(' 角度 /rad'); subplot(6,1,2);plot(t,q(:,2);title(' 转动关节 2');xlabel(' 时间 /s');ylabel(' 角度 /rad'); subplot(6,1,3);plot(t,q(:,3);title(' 转动关节 3');xlabel(' 时间 /s');ylabel(' 角度 /rad'); subplot(6,1,4);plot(t,q(:,4);title(' 转动关节 4');xla

7、bel(' 时间 /s');ylabel(' 角度 /rad' ); subplot(6,1,5);plot(t,q(:,5);title(' 转动关节 5'); xlabel(' 时间 /s'); ylabel(' 角度 /rad');subplot(6,1,6);plot(t,q(:,6);title(' 转动关节 6'); xlabel(' 时间 /s'); ylabel(' 角度 /rad');Rob4.m)1.0645 -1.0201;4) 机器人各关节转动

8、角速度仿真程序: t=0:0.01:10;qA=0 0 0 0 0 0 ;%机械手初始关节量qAB= 1.5709 -0.8902 -0.0481 -0.5178 q,qd,qdd=jtraj(qA,qAB,t);Plot(r,q); subplot(6,1,1);plot(t,qd(:,1); title(' 转动关节 1'); xlabel(' 时间 /s'); ylabel('rad/s'); subplot(6,1,2);plot(t,qd(:,2); title(' 转动关节 2'); xlabel(' 时间 /

9、s'); ylabel('rad/s'); subplot(6,1,3);plot(t,qd(:,3); title(' 转动关节 3'); xlabel(' 时间 /s'); ylabel('rad/s');subplot(6,1,4); plot(t,qd(:,4);title(' 转动关节 4'); xlabel(' 时间 /s'); ylabel('rad/s' );subplot(6,1,5);plot(t,qd(:,5);title(' 转动关节 5

10、9;); xlabel(' 时间 /s');ylabel('rad/s');subplot(6,1,6);plot(t,qd(:,6);title(' 转动关节 6'); xlabel(' 时间 /s'); ylabel('rad/s');5) 机器人各关节转动角加速度仿真程序: ( Rob5.m) t=0:0.01:10;% 产生时间向量qA=0 0 0 0 0 0qAB =1.5709 -0.8902 -0.0481 -0.5178 1.0645 -1.0201; q,qd,qdd=jtraj(qA,qAB,t

11、);figure('name','up6 机器人机械手各关节加速度曲线 '); subplot(6,1,1);plot(t,qdd(:,1);title(' 关节 1'); xlabel(' 时间 (s)');ylabel('加速度(rad/s)');subplot(6,1,2);plot(t,qdd(:,2);title(' 关节 2'); xlabel(' 时间 (s)');ylabel('加速度(rad/s)');subplot(6,1,3);plot(t,qdd(:,3);title(' 关节 3');xlabel('ylabel('时间(s)');加速度(rad/sA2)')subplot(6,1,4);plot(t,qdd(:,4);title('关节4');xlabel('时间(s)');ylabel('加速度(rad/sA2)')subplot(6,1,5);plot(t,qdd(:

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论