L{1}=link([0 0 pi/2 0 0],'modified');
L{2}=link([-pi/2 150 pi/2 0 0],'modified');
L{3}=link([0 640 0 0 0],'modified');
L{4}=link([pi/2 0 0 675 0],'modified');
hithd=robot(L,'hithdrobot');
clear L;
hithd.name='hithdrobot';
drivebot(hithd);%建立机器人数学模型:
q0=[0 0 0 0]; %机械手初始关节量
q1=[pi/2 pi/3 0 0];%末端关节量
t=[0:0.001:2]; %设置时间变量
q=jtraj(q0,q1,t);
plot(hithd,q); %播放设定的运动
tr=fkine(hithd,q) %正运动学计算
tr1=ikine(hithd,q) %运动学逆运算
%运动学仿真
[q,qd,qdd]=jtraj(q0,q1,t);%位移,速度,加速度
figure(3);
subplot(311)
plot(t,q(:,1))
xlabel('时间')
ylabel('位移')
title('关节1位移曲线');
subplot(312)
plot(t,qd(:,1))
xlabel('时间')
ylabel('速度')
title('关节1速度曲线');
subplot(313)
plot(t,qdd(:,1))
xlabel('时间')
ylabel('加速度')
title('关节1加速度曲线');
subplot(3,1,1)
plot(t,q(:,2))
title('第二关节')
xlabel('时间')
ylabel('位移')
subplot(3,1,2)
plot(t,qd(:,2))
xlabel('时间')
ylabel('速度')
subplot(3,1,3)
plot(t,qdd(:,2))
xlabel('时间')
ylabel('加速度')
subplot(3,1,1)
plot(t,q(:,3))
title('第三关节')
xlabel('时间')
ylabel('位移')
subplot(3,1,2)
plot(t,qd(:,3))
xlabel('时间')
ylabel('速度')
subplot(3,1,3)
plot(t,qdd(:,3))
xlabel('时间')
ylabel('加速度')
%运动空间分析
syms e1 e2 e3 x y z k f c;
for k=[0:0.03:1]
e1=(-1+2*k)*pi;
for f=[0:0.03:1]
e2=(-2/9+25/72*f)*pi
for c=[0:0.03:1];
e3=(-1/9+7/9*c)*pi;
x=150*cos(e1) + 640*cos(e1)*cos(e2) + 675*cos(e1)*cos(e2)*sin(e3) + 675*cos(e1)*cos(e3)*sin(e2)
y=150*sin(e1) + 640*cos(e2)*sin(e1) + 675*cos(e2)*sin(e1)*sin(e3) + 675*cos(e3)*sin(e1)*sin(e2)
z=675*cos(e2)*cos(e3) - 675*sin(e2)*sin(e3) - 640*sin(e2)
plot3(x,y,z);
hold on;
end
end
end
xlabel('X'); ylabel('Y');zlabel('Z');
机器人工作空间.rar_matlab工作空间_strongek1_工作空间_机器人_机器人 matlab
版权申诉
201 浏览量
2022-07-15
20:28:59
上传
评论 1
收藏 1KB RAR 举报
钱亚锋
- 粉丝: 86
- 资源: 1万+
最新资源
- 猫咪和汤58.apk
- 浏览器.apk
- 基于matlab实现是一个matlab中的power system 中搭建的一个模型
- 基于JSP毕业设计-教学管理系统(源代码+论文).zip
- 基于JSP毕业设计-家政管理系统-毕业设计.zip
- 基于Python实现淘宝商品评论采集(含逆向)源代码
- 基于matlab实现多目标进化算法NSGAⅡ&Matlab讲解.rar
- 基于matlab实现多车辆车辆路径问题,用遗传算法编程,保证可用.rar
- 基于matlab实现多层极限学习机实现手写体识别,准确率超过99%.rar
- 基于matlab实现电力系统最优潮流程序,可以应用于电力市场下的最优潮流计算 适合电力系统专业的同仁使用.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0