DH参数法建立机器人的运动学正解
Posted King-Blog
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DH参数法建立机器人的运动学正解相关的知识,希望对你有一定的参考价值。
DH参数法建立机器人的运动学正解
a、平面二自由度机器人
clear;
clc;
syms theta1 alpha1 a1 d1 theta2 alpha2 a2 d2 a b theta d;
A1=[cos(theta1),-sin(theta1)*cos(alpha1),sin(theta1)*sin(alpha1),a1*cos(theta1);...
A2=[cos(theta2),-sin(theta2)*cos(alpha2),sin(theta2)*sin(alpha2),a2*cos(theta2);...
L=sqrt(a^2+b^2);
beta=atan(b/a);
a1=L;
alpha1=sym(0);
d1=sym(0);
theta1=theta;
a2=d;
alpha2=sym(0);
d2=sym(0);
theta2=-beta;
T=eval_r(A1*A2)
求得运动学正解为:
b、平面三自由度机器人
clear;
clc;
syms theta1 alpha1 a1 d1 theta2 alpha2 a2 d2 theta3 alpha3 a3 d3 d;
A1=[cos(theta1),-sin(theta1)*cos(alpha1),sin(theta1)*sin(alpha1),a1*cos(theta1);...
A2=[cos(theta2),-sin(theta2)*cos(alpha2),sin(theta2)*sin(alpha2),a2*cos(theta2);...
A3=[cos(theta3),-sin(theta3)*cos(alpha3),sin(theta3)*sin(alpha3),a3*cos(theta3);...
alpha1=sym(0);
d1=sym(0);
a2=d;
alpha2=sym(0);
d2=sym(0);
theta2=sym(0);
alpha3=sym(0);
d3=sym(0);
theta3=-theta3;
T=eval_r(A1*A2*A3)
求得运动学正解为:
c、六自由度机器人
clear;
clc;
syms theta1 alpha1 a1 d1 theta2 alpha2 a2 d2 theta3 alpha3 a3 d3 ...
A1=[cos(theta1),-sin(theta1)*cos(alpha1),sin(theta1)*sin(alpha1),a1*cos(theta1);...
A2=[cos(theta2),-sin(theta2)*cos(alpha2),sin(theta2)*sin(alpha2),a2*cos(theta2);...
A3=[cos(theta3),-sin(theta3)*cos(alpha3),sin(theta3)*sin(alpha3),a3*cos(theta3);...
A4=[cos(theta4),-sin(theta4)*cos(alpha4),sin(theta4)*sin(alpha4),a4*cos(theta4);...
A5=[cos(theta5),-sin(theta5)*cos(alpha5),sin(theta5)*sin(alpha5),a5*cos(theta5);...
A6=[cos(theta6),-sin(theta6)*cos(alpha6),sin(theta6)*sin(alpha6),a6*cos(theta6);...
a1=sym(0);
alpha1=sym(-pi/2);
alpha2=sym(0);
d2=sym(0);
a3=sym(0);
alpha3=sym(-pi/2);
d3=sym(0);
a4=sym(0);
alpha4=sym(-pi/2);
d4=sym(0);
a5=sym(0);
alpha5=sym(pi/2);
d5=sym(0);
a6=sym(0);
alpha6=sym(0);
T=simplify(eval_r(A1*A2*A3*A4*A5*A6))
注:以上的eval_r为eval(不知道为什么,保存后“eval”就变成“eval_r”了)
from:http://blog.sina.com.cn/u/2707887295
以上是关于DH参数法建立机器人的运动学正解的主要内容,如果未能解决你的问题,请参考以下文章
matlab TR = FKINE(ROBOT, Q),Q具体是啥意思,不是已经有个robot对象了吗,为啥还需要参数Q