clear;
deg = pi/180;
L(1)=Link([0 0 0.088 -pi/2 0],'standard');
L(2)=Link([-pi/2 0 0.4 0 0],'standard');
L(3)=Link([0 0 0.04 -pi/2 0],'standard');
L(4)=Link([0 0.405 0 pi/2 0],'standard');
L(5)=Link([0 0 0 pi/2 0],'standard');
L(6)=Link([0 0 0 0 0],'standard');
L(1).m = 0;
L(2).m = 17.4;
L(3).m = 4.8;
L(4).m = 0.82;
L(5).m = 0.34;
L(6).m = .09;
% rx ry rz
L(1).r = [0 0 0 ];
L(2).r = [0.068 0.006 -0.016];
L(3).r = [0 -0.070 0.014 ];
L(4).r = [0 0 -0.019];
L(5).r = [0 0 0 ];
L(6).r = [0 0 .032 ];
% Ixx Iyy Izz Ixy Iyz Ixz
L(1).I = [0 0 0.35 0 0 0];
L(2).I = [.13 .524 .539 0 0 0];
L(3).I = [.066 .0125 .066 0 0 0];
L(4).I = [1.8e-3 1.8e-3 1.3e-3 0 0 0];
L(5).I = [.3e-3 .3e-3 .4e-3 0 0 0];
L(6).I = [.15e-3 .15e-3 .04e-3 0 0 0];
L(1).Jm = 291e-6;
L(2).Jm = 409e-6;
L(3).Jm = 299e-6;
L(4).Jm = 35e-6;
L(5).Jm = 35e-6;
L(6).Jm = 35e-6;
L(1).G = -62.6111;
L(2).G = 107.815;
L(3).G = -53.7063;
L(4).G = 76.0364;
L(5).G = 71.923;
L(6).G = 76.686;
L(1).qlim =[-170 170]*deg;
L(2).qlim =[-65 150]*deg;
L(3).qlim=[-138 255]*deg;
L(4).qlim=[-190 190]*deg;
L(5).qlim=[-135 135]*deg;
L(6).qlim=[-360 360]*deg;
R=SerialLink(L,'name','Motoman_MH5LS');
q0=[0 0 0 0 0 0 ];
T0=R.fkine(q0);
T =[0.7325 0.4619 -0.5000 0.6514;0.1913 -0.8446 -0.5000 0.0787;-0.6533 0.2706 -0.7071 -0.0283;0 0 0 1.0000]; %机器人末端位姿
qn=R.ikine(T);
t=0:0.05:10;
n=jtraj(0,1,t);
TC=ctraj(T0,T,n);
q=R.ikine(TC);
R.plot(q);
figure(2);
subplot(3,3,1);
plot(t,q(:,1));
xlabel('t/s');
ylabel('关节一角位移/rad');
grid on
subplot(3,3,2);
t1=0:0.05:9.95;
w=diff(q(:,1))./diff(t');
plot(t1,w);
xlabel('t/s');
ylabel('关节一角速度/rad/s');
grid on
subplot(3,3,3);
t2=0:0.05:9.9;
v=diff(w)./diff(t1');
plot(t2,v);
xlabel('t/s^2');
ylabel('关节一角加速度/rad/s^2');
grid on
subplot(3,3,4);
plot(t,q(:,2));
xlabel('t/s');
ylabel('关节二角位移/rad');
grid on
subplot(3,3,5);
w1=diff(q(:,2))./diff(t');
plot(t1,w1);
xlabel('t/s');
ylabel('关节二角速度/rad/s');
grid on
subplot(3,3,6);
v1=diff(w1)./diff(t1');
plot(t2,v1);
xlabel('t/s^2');
ylabel('关节二角加速度/rad/s^2');
grid on
subplot(3,3,7);
plot(t,q(:,3));
xlabel('t/s');
ylabel('关节三角位移/rad');
grid on
subplot(3,3,8);
w2=diff(q(:,3))./diff(t');
plot(t1,w2);
xlabel('t/s');
ylabel('关节三角速度/rad/s');
grid on
subplot(3,3,9);
v2=diff(w2)./diff(t1');
plot(t2,v2);
xlabel('t/s^2');
ylabel('关节三角加速度/rad/s^2');
grid on
figure(3);
subplot(3,3,1);
plot(t,q(:,4));
xlabel('t/s');
ylabel('关节四角位移/rad');
grid on
subplot(3,3,2);
w3=diff(q(:,4))./diff(t');
plot(t1,w3);
xlabel('t/s');
ylabel('关节四角速度/rad/s');
grid on
subplot(3,3,3);
v3=diff(w3)./diff(t1');
plot(t2,v3);
xlabel('t/s^2');
ylabel('关节四角加速度/rad/s^2');
grid on
subplot(3,3,4);
plot(t,q(:,5));
xlabel('t/s');
ylabel('关节五角位移/rad');
grid on
subplot(3,3,5);
w4=diff(q(:,5))./diff(t');
plot(t1,w4);
xlabel('t/s');
ylabel('关节五角速度/rad/s');
grid on
subplot(3,3,6);
v4=diff(w4)./diff(t1');
plot(t2,v4);
xlabel('t/s^2');
ylabel('关节五角加速度/rad/s^2');
grid on
subplot(3,3,7);
plot(t,q(:,6));
xlabel('t/s');
ylabel('关节六角位移/rad');
grid on
subplot(3,3,8);
w5=diff(q(:,6))./diff(t');
plot(t1,w5);
xlabel('t/s');
ylabel('关节六角速度/rad/s');
grid on
subplot(3,3,9);
v5=diff(w5)./diff(t1');
plot(t2,v5);
xlabel('t/s^2');
ylabel('关节六角加速度/rad/s^2');
grid on
figure(4);
x(1,1:201)=TC(1,4,:);
y(1,1:201)=TC(2,4,:);
z(1,1:201)=TC(3,4,:);
plot3(x,y,z,'ko');
grid on
没有合适的资源?快使用搜索试试~ 我知道了~
机器人轨迹规划(关节空间轨迹规划和笛卡尔空间轨迹规划)
共2个文件
m:2个
2星 需积分: 50 273 下载量 31 浏览量
2016-04-28
18:49:47
上传
评论 12
收藏 2KB RAR 举报
温馨提示
用Robotics Toolbox for MATLAB做的一个Motoman机器人的关节空间轨迹规划和笛卡尔空间轨迹规划代码
资源推荐
资源详情
资源评论
收起资源包目录
机器人关节空间轨迹规划和笛卡尔空间轨迹规划程序.rar (2个子文件)
机器人关节空间轨迹规划和笛卡尔空间轨迹规划程序
guanjiekongjianguihua.m 2KB
dikaerkongjianguihua.m 4KB
共 2 条
- 1
资源评论
- xu54772432018-07-12不能使用,不过可以做个参考。
- MesutLi2017-10-20不能用啊啊啊啊
- begidne2021-05-16不能用啊,不建议下载
- 青年赵武灵王2016-11-21不能用! 错误使用 tr2angvec (line 56) matrix not orthonormal rotation matrix 出错 SerialLink/ikine (line 191) [th,n] = tr2angvec(Rq'*t2r(T)); 出错 guanjiekongjianguihua (line 21) qn=R.ikine(T); %由机器人末端位姿求出逆解(各关节角位移)
Richard109816
- 粉丝: 7
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功