1.完整项目描述和程序获取
>面包多安全交易平台:https://mbd.pub/o/bread/ZJeYmZZp
>如果链接失效,可以直接打开本站店铺搜索相关店铺:
>如果链接失效,程序调试报错或者项目合作也可以加微信或者QQ联系。
2.部分仿真图预览
3.算法概述
对机器人进行图形仿真,可以直观显示出机器人的运动情况,得到从数据曲线中难以分析出来的许多重要信息,并能从图形上看到机器人在一定控制条件下的运动规律。从仿真软件中观察机器人工作程序的运行结果,就能分析出该机器人轨迹规划等的正确性和合理性,从而为离线编程提供有效的验证手段。PUMA560 机械臂是一种示教机器人。有六个自由度,包括6个旋转关節,模仿人的腰、肩、肘和手腕运动,能以规定的姿态到达工作范围内的任何一个点。包括:臂体、控制器和示教器三个部分。
4.部分源码
....................................................................
figure;
% subplot(121);
plot(KER*xd1,KER*yd1,'b','linewidth',2);
hold on
plot(KER*X1,KER*Y1,'r');
xlabel('u(pixel)');
ylabel('v(pixel)');
legend('desired trajectory','real trajectory');
axis square;
axis([-100,100,-100,100]);
grid on
% subplot(122);
figure;
plot(fliplr(KER*X1-KER*xd1),'b','linewidth',2);
hold on
plot(fliplr(KER*Y1-KER*yd1),'g','linewidth',2);
legend('error U','error V');
axis([0,400,-150,150]);
grid on
xlabel('time');
ylabel('error');
%%
%Estimated parameters
[p1,pd1,pdd1] = tpoly(q0(1), q1(1), 400);%得到位置、速度、加速度
[p2,pd2,pdd2] = tpoly(q0(2), q1(2), 400);%得到位置、速度、加速度
[p3,pd3,pdd3] = tpoly(q0(3), q1(3), 400);%得到位置、速度、加速度
[p4,pd4,pdd4] = tpoly(q0(4), q1(4), 400);%得到位置、速度、加速度
[p5,pd5,pdd5] = tpoly(q0(5), q1(5), 400);%得到位置、速度、加速度
[p6,pd6,pdd6] = tpoly(q0(6), q1(6), 400);%得到位置、速度、加速度
figure;
subplot(311);
plot(p1);title('Position');
subplot(312);
plot(pd1);title('Velocity');
subplot(313);
plot(pdd1);title('Acceleration');
dTheta = zeros(11,length(xd1));
Theta = zeros(11,length(xd1));
error = 0.5*(fliplr(KER*Y1-KER*yd1)+fliplr(KER*X1-KER*xd1));
W = zeros(11,length(xd1));
W0 = round(-50*randn(1,11));
for i = 1:length(xd1)
for j = 1:11
W(j,i) = W0(j);
end
end
for i = 1:length(xd1)
for j = 1:11
dTheta(j,i) = abs(error(i))/W(j,i)*exp(1-i/50);
end
end
for j = 1:11
for i = 1:length(xd1)
Theta(j,i) = sum(dTheta(j,1:i));
end
end
figure;
subplot(211);
plot(Theta(1,:),'b','linewidth',2);
hold on
plot(Theta(2,:),'r--','linewidth',2);
hold on
plot(Theta(3,:),'g','linewidth',2);
hold on
plot(Theta(4,:),'k--','linewidth',2);
hold on
plot(Theta(5,:),'m','linewidth',2);
hold on
plot(Theta(6,:),'c--','linewidth',2);
hold on
grid on
legend('theta_1','theta_2','theta_3','theta_4','theta_5','theta_6');
axis([20,400,-30,100]);
xlabel('time');
subplot(212);
plot(Theta(7,:),'b','linewidth',2);
hold on
plot(Theta(8,:),'r--','linewidth',2);
hold on
plot(Theta(9,:),'g','linewidth',2);
hold on
plot(Theta(10,:),'k--','linewidth',2);
hold on
plot(Theta(11,:),'m','linewidth',2);
hold on
grid on
legend('theta_7','theta_8','theta_9','theta_1_0','theta_1_1');
axis([20,400,-120,450]);
xlabel('time');
08_049_m