前言
前两个章节以及完成了机器人参数辨识。
【机器人学】6-1.六自由度机器人运动学参数辨识-辨识数学模型的建立
【机器人学】6-2.六自由度机器人运动学参数辨识-优化方法求解辨识参数
标定了工具端、基座以及机器人本身的DH参数。那么我们的机器人精度如何呢?机器人的精度应该如何验证?
关于末端定位精度的概念
当我们在机械臂领域谈到未端定位精度这一概念时,实际上是诸多复杂概念的一个统称。整体而言,未端定位精度是描述机械臂整机运动性能的重要定量指标(一般我们会看到这个定量的数值在0.01mm和1m之间),其与机械臂本体硬件结构的刚度、传动误差与相应的伺服控制水平息息相关。
重复定位精度和绝对定位精度
在大多数情况下,工程师口中所述的未端定位精度一般指的是重复定位精度,这边首先就要引出两个重要概念的区分介绍:即重复定位精度(Repeatability)与绝对定位精度(Accuracy)。
重复定位精度是衡量机械臂未端到达空间相同一点一致性的能力,而绝对定位精度衡量的是机械臂未端到达空间目标点准确度的能力。
比如:让机械臂向前走100mm,第一次走到了99.8mm,第二次走到了100.1mm,这个差值0.03mm就是重复定位精度(并不是严格定义),而绝对定位精度是你需要运行100mm的距离,而实际走了101mm,这个差值1mm就是绝对定位精度。
通常由于机械臂本体制造中存在机械制造公差装配误差导致的运动学参数误差以及电机转角与关节转角间减速比误差等,导致机械臂存在重复性定位精度较高(0.05 mm /5个丝)以内,而绝对定位精度通常较低(1~2mm)。
验证标准
我们今天的定位精度的验证标准,遵循中华人民共和国国家标准-工业机器人性能规范及其试验方法-GB/T 12642
验证方法
实验条件:
1. 给机械臂安装一定的负载(通常使用半载),让机器人循环走空间中的5个点30次。用激光测量仪采集数据。此时可以得到激光测量仪采集到的5*30=150个数据,和给定的5个位置数据。
计算位姿准确度-绝对定位精度(AP)
计算位姿重复性-重复定位精度(RP)
重复定位进度的计算只需要对测量到的5*30=150个数据进行操作,而绝对定位精度的计算需要将给定的5个点的位置,与测量值相比较,由于激光测量仪的测量坐标系,与机械臂给定位置的给定值的坐标系不同,故需要进行转换。
其中
T06为我们的给定值,而T67和T-10,以经通过标定给出,故只需用式(6.2)即可求出在激光测量仪坐标系下的给定值。
已知标定后的结果为:
MATLAB代码验证
数据与函数准备
%重复的5个点的位置
function Position = verifyPara()
Position = [
-150,-350,630,78,-42,35;
-150,-650,930,79,-41,37;
150,-650,930,78,-42,35;
150,-350,630,81,-43,37;
0,-500,780,78,-45,41;
];
end
%激光测量仪测量到的5*30=150个数据
function measurementPara= measurementPara()
measurementPara = [
2227.1503 1299.0807 -124.93645 0 0 0;
1958.0963 1161.9514 171.70475 0 0 0;
2087.8145 896.25159 170.83141 0 0 0;
2362.3512 1026.0956 -131.34257 0 0 0;
2161.0067 1090.2524 22.07108 0 0 0;
2227.1328 1299.0675 -124.95587 0 0 0;
1958.0968 1161.9532 171.70837 0 0 0;
2087.8123 896.25279 170.83337 0 0 0;
2362.3504 1026.1024 -131.33808 0 0 0;
2161.0008 1090.2239 22.05651 0 0 0;
2227.1277 1299.0672 -124.957 0 0 0;
1958.0944 1161.9271 171.69652 0 0 0;
2087.7926 896.30133 170.84371 0 0 0;
2362.352 1026.0943 -131.34141 0 0 0;
2161.0026 1090.2215 22.057113 0 0 0;
2227.1286 1299.0658 -124.95844 0 0 0;
1958.0881 1161.9125 171.68597 0 0 0;
2087.7965 896.30007 170.84699 0 0 0;
2362.3567 1026.0941 -131.33545 0 0 0;
2161.0043 1090.217 22.058082 0 0 0;
2227.1269 1299.0627 -124.95822 0 0 0;
1958.088 1161.9106 171.68716 0 0 0;
2087.7957 896.30107 170.85008 0 0 0;
2362.3557 1026.0953 -131.33103 0 0 0;
2161.0028 1090.2176 22.054826 0 0 0;
2227.1245 1299.0624 -124.96233 0 0 0;
1958.0895 1161.9066 171.68568 0 0 0;
2087.7962 896.30256 170.84894 0 0 0;
2362.3569 1026.0909 -131.34075 0 0 0;
2161.0029 1090.2189 22.054347 0 0 0;
2227.1223 1299.0567 -124.96166 0 0 0;
1958.0858 1161.9049 171.68655 0 0 0;
2087.7986 896.30332 170.85224 0 0 0;
2362.3574 1026.094 -131.33775 0 0 0;
2161.0037 1090.2248 22.057439 0 0 0;
2227.1271 1299.0604 -124.95894 0 0 0;
1958.0896 1161.902 171.68774 0 0 0;
2087.7967 896.3074 170.85602 0 0 0;
2362.3575 1026.0921 -131.33658 0 0 0;
2161.0086 1090.2505 22.072462 0 0 0;
2227.1324 1299.0626 -124.95405 0 0 0;
1958.087 1161.8947 171.68433 0 0 0;
2087.7972 896.30836 170.85737 0 0 0;
2362.3605 1026.0935 -131.33612 0 0 0;
2161.0121 1090.2599 22.0819 0 0 0;
2227.1424 1299.0687 -124.94304 0 0 0;
1958.0947 1161.9415 171.70198 0 0 0;
2087.8176 896.26544 170.84715 0 0 0;
2362.3669 1026.0778 -131.34163 0 0 0;
2161.0095 1090.2586 22.077012 0 0 0;
2227.148 1299.0718 -124.93995 0 0 0;
1958.0974 1161.9659 171.71319 0 0 0;
2087.8227 896.243 170.83566 0 0 0;
2362.3656 1026.0794 -131.33656 0 0 0;
2161.0053 1090.2222 22.060474 0 0 0;
2227.1404 1299.0653 -124.94379 0 0 0;
1958.09 1161.9415 171.69821 0 0 0;
2087.8048 896.28336 170.84699 0 0 0;
2362.3655 1026.0884 -131.33415 0 0 0;
2161.0052 1090.2181 22.058498 0 0 0;
2227.141 1299.0652 -124.94244 0 0 0;
1958.0846 1161.9042 171.68599 0 0 0;
2087.7997 896.29979 170.85183 0 0 0;
2362.3688 1026.087 -131.33232 0 0 0;
2161.0078 1090.2438 22.073072 0 0 0;
2227.1406 1299.0661 -124.94075 0 0 0;
1958.0869 1161.9088 171.68885 0 0 0;
2087.7986 896.30631 170.86088 0 0 0;
2362.3698 1026.0803 -131.33583 0 0 0;
2161.0135 1090.2543 22.081642 0 0 0;
2227.1481 1299.0694 -124.93844 0 0 0;
1958.1003 1161.9703 171.7137 0 0 0;
2087.8147 896.27067 170.85004 0 0 0;
2362.3702 1026.0732 -131.33896 0 0 0;
2161.0145 1090.2489 22.079415 0 0 0;
2227.1411 1299.0657 -124.93989 0 0 0;
1958.0911 1161.9327 171.69864 0 0 0;
2087.8039 896.3008 170.85674 0 0 0;
2362.3693 1026.0841 -131.3328 0 0 0;
2161.0093 1090.2225 22.064856 0 0 0;
2227.1393 1299.0619 -124.94452 0 0 0;
1958.0888 1161.8893 171.6866 0 0 0;
2087.8052 896.3025 170.86156 0 0 0;
2362.3721 1026.0838 -131.33244 0 0 0;
2161.0165 1090.2413 22.082128 0 0 0;
2227.1346 1299.0572 -124.9494 0 0 0;
1958.0907 1161.8902 171.68926 0 0 0;
2087.8045 896.30308 170.85715 0 0 0;
2362.3694 1026.0844 -131.33563 0 0 0;
2161.0153 1090.2449 22.080295 0 0 0;
2227.135 1299.058 -124.94482 0 0 0;
1958.0889 1161.8905 171.68681 0 0 0;
2087.8068 896.30223 170.86288 0 0 0;
2362.373 1026.0809 -131.3344 0 0 0;
2161.014 1090.2388 22.081018 0 0 0;
2227.1381 1299.0576 -124.94568 0 0 0;
1958.0941 1161.8954 171.6958 0 0 0;
2087.8106 896.29813 170.86339 0 0 0;
2362.3744 1026.0758 -131.33531 0 0 0;
2161.0166 1090.2423 22.079447 0 0 0;
2227.1338 1299.0522 -124.94801 0 0 0;
1958.0918 1161.8941 171.68975 0 0 0;
2087.8121 896.2927 170.85906 0 0 0;
2362.3766 1026.0839 -131.33044 0 0 0;
2161.0195 1090.2426 22.081034 0 0 0;
2227.1346 1299.052 -124.94854 0 0 0;
1958.0941 1161.8959 171.69126 0 0 0;
2087.811 896.29205 170.86051 0 0 0;
2362.3757 1026.0845 -131.33301 0 0 0;
2161.024 1090.2508 22.08968 0 0 0;
2227.1534 1299.0688 -124.92994 0 0 0;
1958.1047 1161.9637 171.71792 0 0 0;
2087.8274 896.25739 170.85273 0 0 0;
2362.3796 1026.0758 -131.33511 0 0 0;
2161.0208 1090.2432 22.085467 0 0 0;
2227.1357 1299.0578 -124.94638 0 0 0;
1958.0981 1161.923 171.70381 0 0 0;
2087.8116 896.29648 170.86604 0 0 0;
2362.3796 1026.0797 -131.33004 0 0 0;
2161.0191 1090.2472 22.086271 0 0 0;
2227.153 1299.0648 -124.93174 0 0 0;
1958.1018 1161.9538 171.71551 0 0 0;
2087.8185 896.27232 170.8565 0 0 0;
2362.3806 1026.0816 -131.33051 0 0 0;
2161.0192 1090.2453 22.085389 0 0 0;
2227.142 1299.0491 -124.94231 0 0 0;
1958.0928 1161.8919 171.68926 0 0 0;
2087.8098 896.29497 170.86687 0 0 0;
2362.3808 1026.0833 -131.33199 0 0 0;
2161.0221 1090.2497 22.094875 0 0 0;
2227.1397 1299.0522 -124.94604 0 0 0;
1958.0909 1161.8938 171.68821 0 0 0;
2087.8105 896.29812 170.86859 0 0 0;
2362.3816 1026.0819 -131.32675 0 0 0;
2161.0214 1090.2481 22.090946 0 0 0;
2227.138 1299.0493 -124.94669 0 0 0;
1958.0962 1161.8912 171.69576 0 0 0;
2087.8151 896.2934 170.87058 0 0 0;
2362.3833 1026.0814 -131.3294 0 0 0;
2161.0205 1090.2542 22.094345 0 0 0;
2227.1403 1299.0491 -124.9435 0 0 0;
1958.0927 1161.8883 171.68916 0 0 0;
2087.8144 896.29467 170.87374 0 0 0;
2362.383 1026.0798 -131.32969 0 0 0;
2161.0222 1090.2577 22.094401 0 0 0;
2227.1387 1299.0474 -124.94533 0 0 0;
1958.0936 1161.8906 171.69421 0 0 0;
2087.8112 896.30127 170.86989 0 0 0;
2362.3816 1026.0765 -131.33263 0 0 0;
2161.0222 1090.2542 22.09253 0 0 0;
];
end
%旋转矩阵转轴角
function Rxyz=RotMat_AxisAngle(R)
theta = acos((R(1,1)+R(2,2)+R(3,3)-1)/2);
r = 1/2/sin(theta)*[R(3,2)-R(2,3);R(1,3)-R(3,1);R(2,1)-R(1,2)];
Rxyz=theta*r;
end
%轴角转旋转矩阵
function R=AxisAngle_RotMat(Rxyz)
theta=(Rxyz(1)^2+Rxyz(2)^2+Rxyz(3)^2)^0.5;
if(abs(theta)<1e-8)
R=eye(3);
return;
end
r=Rxyz/theta;
R=[r(1)^2*(1-cos(theta))+cos(theta) r(1)*r(2)*(1-cos(theta))-r(3)*sin(theta) r(1)*r(3)*(1-cos(theta))+r(2)*sin(theta)
r(1)*r(2)*(1-cos(theta))+r(3)*sin(theta) r(2)^2*(1-cos(theta))+cos(theta) r(2)*r(3)*(1-cos(theta))-r(1)*sin(theta)
r(1)*r(3)*(1-cos(theta))-r(2)*sin(theta) r(2)*r(3)*(1-cos(theta))+r(1)*sin(theta) r(3)^2*(1-cos(theta))+cos(theta)];
end
%绕Z轴的旋转矩阵转换
function R = rotz(t, deg)
if nargin > 1 && strcmp(deg, 'deg')
t = t *pi/180;
end
ct = cos(t);
st = sin(t);
R = [
ct -st 0
st ct 0
0 0 1
];
%绕Y轴的旋转矩阵转换
function R = roty(t, deg)
if nargin > 1 && strcmp(deg, 'deg')
t = t *pi/180;
end
ct = cos(t);
st = sin(t);
R = [
ct 0 st
0 1 0
-st 0 ct
];
%绕X轴的旋转矩阵转换
function R = rotx(t, deg)
if nargin > 1 && strcmp(deg, 'deg')
t = t *pi/180;
end
ct = cos(t);
st = sin(t);
R = [
1 0 0
0 ct -st
0 st ct
];
计算与验证代码
clc;
clear;
addPoint = zeros(5,6);
P07 = [];
% 30*5=150 组激光测量仪测量到的数据
measurementPara = measurementPara();
length = size(measurementPara);
for i=1:length
if(mod(i,5)==0)
addPoint(5,:) = addPoint(5,:) + measurementPara(i,:);
else
addPoint(mod(i,5),:) = addPoint(mod(i,5),:) + measurementPara(i,:);
end
end
addPoint = addPoint/30;
% RD1100W1BY670W92024-07-21-1数据
%基座标定数据
R00 = rotZ(-1.118222)*rotY(0.004544 )*rotX(0.006666);
P00 = [2.711833, 1.361573, -0.718014]'*1000;
%工具端标定数据
R67 = rotZ(1.933119)*rotY(-1.537018)*rotX(-1.01495);
P67 = [-0.029781, -0.029171, 0.106038]'*1000;
APR = zeros(5,3);
AllT06=verifyPara();
for i=1:5
T06 = AllT06(i,:);
R06 = AxisAngle_RotMat([T06(1,4),T06(1,5),T06(1,6)]/180*pi);
P06 = T06(1,1:3)';
P07 =[P07;[(R00*R06*P67)+(R00*P06)+P00]'];
R07 = R00*R06*R67;
APR(i,2) = atan2(-R07(1,3),sqrt(R07(2,3)^2+R07(3,3)^2)); % beta Y
APR(i,1) = atan2(R07(2,3)/cos(APR(i,2)),R07(3,3)/cos(APR(i,2))); % aerfa X
APR(i,3) = atan2(R07(1,2)/cos(APR(i,2)),R07(1,1)/cos(APR(i,2))); % gama Z
end
APR = APR*180/pi - addPoint(:,4:6);
APP = addPoint(:,1:3) - P07;
APP = sqrt(APP(:,1).^2 + APP(:,2).^2 + APP(:,3).^2);
%绝对定位精度
AP=[APP ,APR]
L = [0 0 0 0 0];
Lt = [];
RPR = zeros(5,3);
for i=1:length
if(mod(i,5)==0)
L(5) = L(5) + sqrt((addPoint(5,1) - measurementPara(i,1))^2+(addPoint(5,2) - measurementPara(i,2))^2+(addPoint(5,3) - measurementPara(i,3))^2);
Lt(i) = sqrt((addPoint(5,1) - measurementPara(i,1))^2+(addPoint(5,2) - measurementPara(i,2))^2+(addPoint(5,3) - measurementPara(i,3))^2);
RPR(5,:)= RPR(5,:) + (addPoint(5,4:6)-measurementPara(i,4:6)).^2;
else
L(mod(i,5)) = L(mod(i,5)) + sqrt((addPoint(mod(i,5),1) - measurementPara(i,1))^2+(addPoint(mod(i,5),2) - measurementPara(i,2))^2+(addPoint(mod(i,5),3) - measurementPara(i,3))^2);
Lt(i) = sqrt((addPoint(mod(i,5),1) - measurementPara(i,1))^2+(addPoint(mod(i,5),2) - measurementPara(i,2))^2+(addPoint(mod(i,5),3) - measurementPara(i,3))^2);
RPR(mod(i,5),:)= RPR(mod(i,5),:)+(addPoint(mod(i,5),4:6)-measurementPara(i,4:6)).^2;
end
end
L=L/30;
Lm = [0 0 0 0 0];
for i=1:length
if(mod(i,5)==0)
Lm(5) = Lm(5) + (L(5)-Lt(i))^2;
else
Lm(mod(i,5)) = Lm(mod(i,5)) + (L(mod(i,5))-Lt(i))^2;
end
end
Lm = sqrt(Lm/29);
RPR = 6*sqrt(RPR/29);
RPP= [L + 3*Lm]';
%重复定位精度
RP = [RPP RPR]
测试结果
本实验数据来自一个不合格的机器人标定数据。
如上图可知:由于激光测量仪只是测量了位置信息,没有姿态信息,故重复定位精度的姿态重复度为0,绝对定位精度的姿态精度不具备参考性。该机器人的绝对定位进度为1.7088mm效果较差,重复定位精度为0.645效果一般。
下一章 【机器人学】6-5.六自由度机器人运动学参数辨识-逆运动学迭代解【附MATLAB代码】