Robotic Mechanics and Modeling/Kinematics/Additional Examples of Homogeneous Transforms

An example for homogeneous transformation in 3 different frames
Frame b is rotated and translated with respect to frame a in angle:(-20,-20,-20), distance:(0.5,0.5,0.5); Frame c is rotated and translated with respect to frame b in angle:(20,20,20), distance:(0.8,0.2,0.3). There is a point (1,2,3) in frame a, we can calculate the position in frame c by $$^{c}_{a}T = \, ^{b}_{a}T \, ^{c}_{b}T$$.

Output: Homogenous transform from b to a: [ 0.16653097 0.71268034  0.68143537  0.5       ] [-0.37255658 -0.59438062 0.71268034  0.5       ] [ 0.91294525 -0.37255658  0.16653097  0.5       ] [ 0.          0.          0.          1.        ] Homogenous transform from c to b: [ 0.16653097 -0.03243282  0.98550269  0.8       ] [ 0.37255658 0.92744256 -0.03243282  0.2       ] [-0.91294525  0.37255658  0.16653097  0.3       ] [ 0.          0.          0.          1.        ] Homogenous transform from c to a [-0.32886687  0.90944224  0.25448258  0.98019146] [-0.93412075 -0.27365708 -0.22919472 0.29688271] [-0.13879841 -0.31309201  0.93952562  1.20580418] [ 0.          0.          0.          1.        ] The position in frame c is [-1.8464631 ] [-1.00980375] [ 1.30038838]

An example of a practical use of a homogeneous transform matrix
A plane is performing tricks at an air show. Its current heading is 15 degrees yaw (rotation about z axis), 25 degrees pitch (y axis) and 15 degrees roll (x axis) and its current position is $$\langle0, 500, 1000\rangle\ \mathsf{meters}$$ away from the air traffic control tower. The air tower suddenly spots a drone at position $$\langle5,550,1020\rangle\ \mathsf{meters}$$ from the tower. What are the coordinates of the drone relative to the pilot? The output is 7.65] [52.04] [12.6

This means that the pilot of the plane sees the drone at a relative $$\langle7.65, 52.04, 12.6\rangle\ \mathsf{meters}$$ away.

An example of finding coordinates of end effector of robotic arm in different frames by using homogeneous transform matrix
The position of end effector of a 3-joint robotic arm is $$\langle0.1, 0.2, 0.3\rangle\ \mathsf{meters}$$ relative to the frame B, and frame B relative to frame A (global frame) is $$\langle0.5, 0.6, 0.7\rangle\ \mathsf{meters}$$ in distance and $$\langle30, 40, 50\rangle\ \mathsf{degree}$$ in angle, then what is the position of end effector in frame A?

Output: Homogeneous transform matrix from frame B to frame A is: [ 0.66341395 0.10504046  0.74084306  0.5       ] [ 0.38302222  0.80287234 -0.45682599  0.6       ] [-0.64278761  0.58682409  0.49240388  0.7       ] [ 0.          0.          0.          1.        ]

And the position of end effector in frame A is: [0.81] [0.66] [0.9 ] $$\mathsf{meters}$$