机器人坐标变换
假设有一点 P\mathrm{P}P ,在机器人坐标系 (B)\mathrm{(B)}(B) 中其坐标为 PB\mathrm{P^B}PB,在世界坐标系 (A)\mathrm{(A)}(A) 中其坐标为 PA\mathrm{P^A}PA,PA\mathrm{P^A}PA 和 PB\mathrm{P^B}PB 之间可以通过变换矩阵 TBA\mathrm{T^A_B}TBA 完成。即:
PA=TBA⋅PB\mathrm{P^A=T^A_B{\cdot}P^B}PA=TBA⋅PB
其中 TBA=[RBAtBA01]\mathrm{T^A_B=\begin{bmatrix}\mathrm{R^A_B} & \mathbf{t}\mathrm{^A_B} \\ \mathbf{0} & \mathrm{1} \end{bmatrix}}TBA=[RBA0tBA1] , RBA\mathrm{R^A_B}RBA 是从坐标系 A\mathrm{A}A 到坐标系 B\mathrm{B}B 的旋转矩阵,tBA\mathbf{t}\mathrm{^A_B}tBA 是从坐标系 A\mathrm{A}A 到 B\mathrm{B}B 的平移向量。
从 PB\mathrm{P^B}PB 到 PA\mathrm{P^A}PA 的变换叫做 刚体变换。
在机器人上搭载一个传感器,点 P\mathrm{P}P 在传感器坐标系 (C)\mathrm{(C)}(C) 中的坐标为 PC\mathrm{P^C}PC 。从 PC\mathrm{P^C}PC 到 PB\mathrm{P^B}PB 再到 PA\mathrm{P^A}PA ,经过了两次坐标系变换,过程如下:
PB=TCB⋅PC\mathrm{P^B=T^B_C \cdot P^C}PB=TCB⋅PC
PA=TBA⋅PB\mathrm{P^A = T^A_B \cdot P^B}PA=TBA⋅PB
综合两次变换得到:
PA=TBA⋅TCB⋅PC\mathrm{P^A=T^A_B \cdot T^B_C \cdot P^C}PA=TBA⋅TCB⋅PC
上述两次变换可以看成由一次变换得到,即 TCA\mathrm{T^A_C}TCA ,而 TCA=TBA⋅TCB\mathrm{T^A_C = T^A_B \cdot T^B_C}TCA=TBA⋅TCB 。
将 TCA=TBA⋅TCB\mathrm{T^A_C = T^A_B \cdot T^B_C}TCA=TBA⋅TCB 称为 坐标变换 。