Relation between two frames in different coordinate systems

673 Views Asked by At

Salutations, I have the following problem, There exists two frames (by frame I refer to a point in $3$D space with known translation and orientation of where axis are pointing in relation to their coordinate systems), these two frames exist in their own coordinate systems but they are directly connected to one another. So if there exist two frames $A$ and $B$, $B$ is attached to $A$ by translating or rotating $A$, $B$ will change it's position in space but this position is only known from the coordinate system of B. These two frames physically from the world coordinate system are not in the same position. The target here is to find the relation between frame $A$ and frame $B$ in the coordinate system of $A$.

Is there any way to calculate this relation ?

1

There are 1 best solutions below

0
On BEST ANSWER

Frames $A$ and $B$ are defined in relation to the world coordinate system as follows

$ P_W = R_A P_A + d_A $

$ P_W = R_B P_B + d_B $

where $P_W$ is the coordinate vector with respect to the world coordinate system, $P_A$ is the coordinate vector with respect to frame $A$, and $P_B$ is the coordinate vector with respect to frame $B$. $R_A$ and $R_B$ are rotation matrices whose columns define the direction of the $x,y, z$ coordinate axes of frames $A$ and $B$ with respect to the world coordinate system. $d_A $ and $d_B$ are world coordinate vectors which define the position of the origin of frames $A$ and $ B $ in relation to the world coordinate system.

From here, to relate frames $A$ and $B$, set

$ R_A P_A + d_A = R_B P_B + d_B $

Then it would follow that

$ P_B = R_B^T ( R_A P_A + d_A - d_B ) = (R_B^T R_A) P_A + R_B^T (d_A - d_B) $

which is of the form

$ P_B = R_{AB} P_A + d_{AB} $

where $R_{AB} = R_B^T R_A $ (a rotation matrix, describes the relative orientation of the axes of frame $A$ with respect to frame $B$) and $ d_{AB} = R_B^T (d_A - d_B) $ (a translation vector, is the coordinate vector of the origin of frame $A$ relative to frame $B$).