REIS 工业机器人位姿数据类型 – P

目录 Content
[hide]

REIS 机器人的位置变量以字母 P 开头,那么他的结构是怎么样的呢?本文欲对其进行剖析。

为了形象说明,举两个例子,分别对应静态用户坐标系、动态外部坐标系来说明其数据结构。以下的源文件对应REIS的5代控制器,即RSV。

一、静态用户坐标系

在虚拟仿真系统里建立一个静态用户坐标系:NAME1

MPR "CAL"
I 1 NAME1:61
TOOL Variable:_Tnull
I   NAME2:61
POSITION #N,$BASE,X:971.67,Y:-0.00,Z:343.42,A:-89.9997,B:-0.0009,C:-155.5231,A1:0.0000,A2:-79.9438,A3:100.6251,A4:-90.0009,A5:44.8418,A6:0.0000,Version:14,T_x:0.00,T_y:0.00,T_z:0.00,T_RA:0.0000,T_RB:-0.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:-0.0000,MRF_RC:-0.0000
POSITION #N,$BASE,X:971.67,Y:-450.72,Z:343.42,A:-90.0017,B:0.0003,C:-155.5228,A1:-25.7512,A2:-71.2031,A3:89.3390,A4:-76.4821,A5:50.3613,A6:-32.4199,Version:14,T_x:0.00,T_y:0.00,T_z:0.00,T_RA:0.0000,T_RB:-0.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:-0.0000,MRF_RC:-0.0000
POSITION #N,$BASE,X:1130.23,Y:-450.72,Z:343.41,A:-90.0015,B:0.0009,C:-155.5241,A1:-22.4106,A2:-58.4575,A3:70.4097,A4:-78.9797,A5:55.7227,A6:-26.8301,Version:14,T_x:0.00,T_y:0.00,T_z:0.00,T_RA:0.0000,T_RB:-0.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:-0.0000,MRF_RC:-0.0000
END

源码下载:CAL

REIS在系统内部并没有使用欧拉角来表示,而是使用一个 4X4 的矩阵来表示,其数值如下:

_FCALST[1]_1_FCALST[1]_2如果要转换成欧拉角来表示的话,用KUKA的表示方法是

{X 971.67, Y 0.0, Z 343.42, A -90.0, B 0.0, C 0.0 }

其位置如图:

CAL_PROVIS_XYZABC下面将分别用机器人的世界坐标系 ( 为了和其他机器人统一,此处“世界坐标系”默认和机器人底座坐标系重合 ) 和用户坐标系插入同一个点,来看数据有何不同

MPR "POS1"
TOOL Variable:_Tnull
POSITION #N,$BASE,X:1130.23,Y:-450.72,Z:492.14,A:-90.0024,B:0.0011,C:-155.5256,A1:-22.4106,A2:-59.7283,A3:57.6216,A4:-80.2959,A5:69.5566,A6:-23.9883,Version:14,T_x:0.00,T_y:0.00,T_z:0.00,T_RA:0.0000,T_RB:-0.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:-0.0000,MRF_RC:-0.0000
POSITION #N,NAME1,X:450.72,Y:158.56,Z:148.73,A:-0.0026,B:0.0011,C:-155.5244,A1:-22.4106,A2:-59.7283,A3:57.6216,A4:-80.2959,A5:69.5566,A6:-23.9883,Version:14,T_x:0.00,T_y:0.00,T_z:0.00,T_RA:0.0000,T_RB:-0.0000,T_RC:-0.0000,MRF_x:971.67,MRF_y:-0.00,MRF_z:343.42,MRF_RA:-89.9999,MRF_RB:0.0000,MRF_RC:-0.0012
END

源码下载:POS1

可以看到插入一个位置时,由以下数据组合构成:

  • XYZABC:当前工具在当前坐标系中的位姿。其中,A为Rz,B为Ry,C为Rx
  • A1-A6:当前各个轴的角度
  • Version:版本号
  • T_x/y/z/RA/RB/RC:显示当前的工具坐标系的数值
  • MRF_x/y/z/RA/RB/RC:显示当前坐标系在主参考坐标系(当前为世界坐标系)中的位姿

$BASE 就是世界坐标系,NAME1是校准出来的用户坐标系,可以看到同一个点,明显数据不一样,可以对照上面的意义来解析其数值含义。

上面的两条位姿语句是插入的常常量(“硬“点),不是变量的形式,下面来列举变量的形式。

定义一个位置变量,并通过语句将位置存入变量,世界坐标系的Frame索引为0,NAME1的索引为1

MPR "POS1"
VAR Name:P1
TOOL Variable:_Tnull
POSITION #N,$BASE,X:1130.23,Y:-450.72,Z:492.14,A:-90.0024,B:0.0011,C:-155.5256,A1:-22.4106,A2:-59.7283,A3:57.6216,A4:-80.2959,A5:69.5566,A6:-23.9883,Version:14,T_x:0.00,T_y:0.00,T_z:0.00,T_RA:0.0000,T_RB:-0.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:-0.0000,MRF_RC:-0.0000
POSITION #N,NAME1,X:450.72,Y:158.56,Z:148.73,A:-0.0026,B:0.0011,C:-155.5244,A1:-22.4106,A2:-59.7283,A3:57.6216,A4:-80.2959,A5:69.5566,A6:-23.9883,Version:14,T_x:0.00,T_y:0.00,T_z:0.00,T_RA:0.0000,T_RB:-0.0000,T_RC:-0.0000,MRF_x:971.67,MRF_y:-0.00,MRF_z:343.42,MRF_RA:-89.9999,MRF_RB:0.0000,MRF_RC:-0.0012
C 
ACTUAL_POS Variable:P1,#N,Frame:0
C
ACTUAL_POS Variable:P1,#N,Frame:1
END

查看P1的值,如下:

P1_VAR可以看到其成员如下:

1、用户程序能够读写的成员

  • MA:本体轴的数目
  • AA:外部轴的数目
  • Frame:坐标系的索引
  • pos-type:位置的类型
  • XYZABC:位姿
  • A1-24:各轴角度

2、ProVis里能够读写的成员

  • Version:点位对象的版本
  • T-X/Y/Z/RA/RB/RC:当坐标系的数值
  • MRF-X/Y/Z/RA/RB/RC:当前主参考坐标系的数值
  • FRAME_NAME:坐标系的名称

二、动态外部坐标系

在虚拟仿真系统里插入一个二轴变位机,然后在它的法兰上校准出一个坐标系STAT1,这个外部动态坐标系能够跟随外轴一起转动。

SPR "FRAME_CAL"
I 1 STAT1:7 8
TOOL Variable:T1
I ext:7
POSITION #N,$BASE,X:1025.00,Y:0.00,Z:-105.00,A:-28.0868,B:-3.2455,C:171.2730,A1:-11.7380,A2:-81.3101,A3:124.4953,A4:-79.9293,A5:-39.7756,A6:-27.0006,A7:0.0000,A8:0.0000,Version:14,T_x:143.85,T_y:0.00,T_z:215.89,T_RA:180.0000,T_RB:-60.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:0.0000,MRF_RC:0.0000
POSITION #N,$BASE,X:910.83,Y:-0.01,Z:-65.69,A:-28.0860,B:-3.2456,C:171.2730,A1:-13.5963,A2:-93.4158,A3:132.7008,A4:-85.9341,A5:-40.6839,A6:-20.7422,A7:23.9090,A8:0.0000,Version:14,T_x:143.85,T_y:0.00,T_z:215.89,T_RA:180.0000,T_RB:-60.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:0.0000,MRF_RC:0.0000
POSITION #N,$BASE,X:767.23,Y:-0.03,Z:-84.23,A:-28.0850,B:-3.2458,C:171.2720,A1:-16.9460,A2:-105.7177,A3:144.3523,A4:-88.8964,A5:-43.2571,A6:-19.5925,A7:52.6820,A8:0.0000,Version:14,T_x:143.85,T_y:0.00,T_z:215.89,T_RA:180.0000,T_RB:-60.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:0.0000,MRF_RC:0.0000
I ext:8
POSITION #N,$BASE,X:767.23,Y:-0.03,Z:-84.23,A:-28.0850,B:-3.2458,C:171.2720,A1:-16.9460,A2:-105.7177,A3:144.3523,A4:-88.8964,A5:-43.2571,A6:-19.5925,A7:52.6820,A8:0.0000,Version:14,T_x:143.85,T_y:0.00,T_z:215.89,T_RA:180.0000,T_RB:-60.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:0.0000,MRF_RC:0.0000
POSITION #N,$BASE,X:755.36,Y:74.01,Z:-99.76,A:-28.0859,B:-3.2459,C:171.2720,A1:-24.1516,A2:-102.3792,A3:143.9543,A4:-90.7238,A5:-48.7806,A6:-23.6465,A7:52.6820,A8:29.5740,Version:14,T_x:143.85,T_y:0.00,T_z:215.89,T_RA:180.0000,T_RB:-60.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:0.0000,MRF_RC:0.0000
POSITION #N,$BASE,X:700.37,Y:144.60,Z:-171.71,A:-28.0860,B:-3.2457,C:171.2710,A1:-32.8078,A2:-94.8804,A3:147.8707,A4:-88.1570,A5:-54.8086,A6:-38.0733,A7:52.6820,A8:74.5730,Version:14,T_x:143.85,T_y:0.00,T_z:215.89,T_RA:180.0000,T_RB:-60.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:0.0000,MRF_RC:0.0000
END

LT 无法用ABCXYZ的方式来描述其外轴的坐标变换,且看系统里自己的描述吧

_FCALAX[7][8]下面来看在不同的7轴和8轴位置,保持机器人本体不改变位置的情况下,插入点位的数值:

MPR "POS2"
TOOL Variable:_Tnull
POSITION #N,$BASE,X:961.30,Y:0.00,Z:317.56,A:-90.0000,B:-0.0000,C:-154.7841,A1:0.0000,A2:-90.0000,A3:106.1065,A4:0.0000,A5:48.6776,A6:0.0000,A7:0.0000,A8:0.0000,Version:14,T_x:0.00,T_y:0.00,T_z:0.00,T_RA:0.0000,T_RB:-0.0000,T_RC:-0.0000,MRF_x:0.00,MRF_y:0.00,MRF_z:0.00,MRF_RA:0.0000,MRF_RB:-0.0000,MRF_RC:-0.0000
POSITION #N,STAT1,X:85.92,Y:-0.08,Z:422.43,A:-90.0093,B:0.0117,C:-154.7101,A1:0.0000,A2:-90.0000,A3:106.1065,A4:0.0000,A5:48.6776,A6:0.0000,A7:0.0000,A8:0.0000,Version:14,T_x:0.00,T_y:0.00,T_z:0.00,T_RA:0.0000,T_RB:-0.0000,T_RC:-0.0000,MRF_x:874.84,MRF_y:-0.02,MRF_z:-104.76,MRF_RA:0.0093,MRF_RB:0.0740,MRF_RC:-0.0116
POSITION #N,STAT1,X:213.18,Y:-238.52,Z:347.92,A:-138.2080,B:0.0085,C:-175.5811,A1:0.0000,A2:-90.0000,A3:106.1065,A4:0.0000,A5:48.6776,A6:0.0000,A7:20.8710,A8:48.1960,Version:14,T_x:0.00,T_y:0.00,T_z:0.00,T_RA:0.0000,T_RB:-0.0000,T_RC:-0.0000,MRF_x:785.77,MRF_y:-0.04,MRF_z:-121.28,MRF_RA:50.1157,MRF_RB:-13.6811,MRF_RC:-15.8158
END

可以看到,当采用外部动态坐标系后,MRF 的数值也是随着外部坐标系的移动而改变的。

三、RS6 插入点位的结构

上面介绍的是 RS5的结构,RS6的结构有所改变,但还是能够兼容RS5的结构的。
RS5

MPR "POS"
TOOL Variable:T_1
POSITION #N,STAT_1,X:-1463.60,Y:1048.09,Z:154.88,A:-35.2092,B:49.8020,C:40.7740,A1:14.7275,A2:-76.7417,A3:84.2453,A4:-161.4694,A5:-98.0479,A6:158.5195,A7:-524.8691,A8:-0.0963,A9:-394.4580,A10:0.0000,A11:0.0000,Version:14,T_x:58.78,T_y:57.70,T_z:483.01,T_RA:-0.3414,T_RB:-52.7322,T_RC:-137.0888,MRF_x:847.37,MRF_y:2571.92,MRF_z:854.51,MRF_RA:-179.0872,MRF_RB:-0.4599,MRF_RC:50.6846
END

RS6

MPR "POS"
TOOL Variable:T_1
XPOS <XPOS Type="#N"><TCP_T Frame="STAT_1"><x>-1.46359760261033780e+003</x><y>1.04808677559902590e+003</y><z>1.54877098636750250e+002</z></TCP_T><TCP_R Frame="$BASE"><rx>4.07740245369807610e+001</rx><ry>4.98020001005421090e+001</ry><rz>-3.52092453177226190e+001</rz></TCP_R><Axes><A1>1.47275390625000360e+001</A1><A2>-7.67416992187501850e+001</A2><A3>8.42453431689047250e+001</A3><A4>-1.61469350140104010e+002</A4><A5>-9.80478515625000990e+001</A5><A6>1.58519531250000170e+002</A6><A7>-5.24869103438267420e+002</A7><A8>-9.62571364182691490e-002</A8><A9>-3.94458007812500000e+002</A9><A10>0.00000000000000000e+000</A10><A11>0.00000000000000000e+000</A11></Axes><Teach_Tool_T><x>5.87796119225439500e+001</x><y>5.77038999999999970e+001</y><z>4.83013199999999980e+002</z></Teach_Tool_T><Teach_Tool_R><rx>-1.37088799999999990e+002</rx><ry>-5.27322000000000200e+001</ry><rz>-3.41429999999999620e-001</rz></Teach_Tool_R><MRF_T><x>8.47365361400437220e+002</x><y>2.57192310843911670e+003</y><z>8.54507718498717850e+002</z></MRF_T><MRF_R><rx>5.06846490973892540e+001</rx><ry>-4.59874407193375630e-001</ry><rz>-1.79087199986105900e+002</rz></MRF_R></XPOS>
END

可以相互转换

四、扩展阅读

Leave a Reply

Your email address will not be published. Required fields are marked *