REIS 工业机器人坐标系数据类型 – F

目录 Content
[hide]

在上一篇文章里《REIS工业机器人位姿数据类型 – P》介绍了REIS工业机器人的位置数据类型 P,里面提到过一些坐标系,REIS 机器人的坐标系变量以字母 F 开头,那么他的结构是怎么样的呢?本文将对其进行介绍。

为了形象说明,举两个例子,分别对应静态用户坐标系、动态外部坐标系来说明其数据结构。依然采用上一篇的坐标系数值,只是名称做了一些小改动。

一、静态用户坐标系

在虚拟仿真系统里建立一个静态用户坐标系: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

上述校准程序可以建立起一个名为NAME1的静态坐标系,其数值存储在_FCALST[1] 中。

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

用户程序可以读写

  • XYZ :当前坐标系相对于参考坐标系的位置
  • RX\Y\Z:当前坐标系相对于参考坐标系的姿态

用程序可以将其数值读出(当然也可以写入)

MPR "FRAME"
VAR Name:R_F1_X
VAR Name:R_F1_Y
VAR Name:R_F1_Z
VAR Name:R_F1_A
VAR Name:R_F1_B
VAR Name:R_F1_C
COPY Source:_FCALST[1].x,Dest_Var:R_F1_X
COPY Source:_FCALST[1].y,Dest_Var:R_F1_Y
COPY Source:_FCALST[1].z,Dest_Var:R_F1_Z
COPY Source:_FCALST[1].rz,Dest_Var:R_F1_A
COPY Source:_FCALST[1].ry,Dest_Var:R_F1_B
COPY Source:_FCALST[1].rx,Dest_Var:R_F1_C
END

实际读出来的数值为

  • R_F1_X: 971.6663
  • R_F1_Y: -0.0010
  • R_F1_Z: 343.4179
  • R_F1_A: -90.0000 ,即 rz
  • R_F1_B: 0.0000,即 ry
  • R_F1_C: -0.0012,即 rx

可见上篇文章里的 {X 971.67, Y 0.0, Z 343.42, A -90.0, B 0.0, C 0.0 } 是正确的 :)

2、ProVis 里能够读写的成员

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

_FCALST[1]_1_FCALST[1]_2那么,这个4*4的矩阵是什么样子的呢?如下:

4X4_MATRIX填入 {X 971.67, Y 0.0, Z 343.42, A -90.0, B 0.0, C 0.0 } 的数值,经过计算,吻合!

REIS_Euler2Matrix本表格下载: REIS_Euler2Matrix

二、动态外部坐标系

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

SPR "FRAME_CAL"
I 2 AXIS7:7
I 1 AXIS78: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

为了描述方便,这里建立了两个坐标系,一个是第7轴上的AXIS7[2],一个是78轴联合的AXIS78[1],第7轴的坐标系存储在 _FCALSX[7] 中,描述的是轴7相对于$BASE的关系,第8轴的坐标系存储在 _FCALAX[8]中,描述的是轴8相对于轴7的关系。其位置如图:

AXIS7_8

(关于Z轴方向,则是对应轴转动的正方向,右手法则)

系统自己4X4的矩阵描述变换如下:

_FCALAX[7][8]我们可以将其XYZABC的数值整理出来

MPR "FRAME"
VAR Name:R7X
VAR Name:R7Y
VAR Name:R7Z
VAR Name:R7A
VAR Name:R7B
VAR Name:R7C
VAR Name:R8X
VAR Name:R8Y
VAR Name:R8Z
VAR Name:R8A
VAR Name:R8B
VAR Name:R8C
COPY Source:_FCALAX[7].x,Dest_Var:R7X
COPY Source:_FCALAX[7].y,Dest_Var:R7Y
COPY Source:_FCALAX[7].z,Dest_Var:R7Z
COPY Source:_FCALAX[7].rz,Dest_Var:R7A
COPY Source:_FCALAX[7].ry,Dest_Var:R7B
COPY Source:_FCALAX[7].rx,Dest_Var:R7C
COPY Source:_FCALAX[8].x,Dest_Var:R8X
COPY Source:_FCALAX[8].y,Dest_Var:R8Y
COPY Source:_FCALAX[8].z,Dest_Var:R8Z
COPY Source:_FCALAX[8].rz,Dest_Var:R8A
COPY Source:_FCALAX[8].ry,Dest_Var:R8B
COPY Source:_FCALAX[8].rx,Dest_Var:R8C
C 
END

得到的数据,用KUKA的表示形式表示出来为:

AXIS7 {X 875.1419,Y -0.0575, Z -354.8274, A 0.0220, B -59.0427, C 89.9828}

AXIS8 {X 214.2901, Y 128.8913, Z 0.0055, A -59.1168, B 0.0021, C -90.0028}

将数值带入 REIS_Euler2Matrix 计算,可以看到是吻合的。

REIS_Euler2Matrix_AXIS7REIS_Euler2Matrix_AXIS8 至此,REIS的坐标系变换原理已基本明晰!

三、扩展阅读

 

Leave a Reply

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