Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

Coordinate Transformation

Basics
Prof. Yeh, T.-J.
2-D Coordinate Transformation
𝒂1 and 𝒂2 are the base vectors of 𝐗 2 𝐘2
𝐘1
𝐘2 𝑥1
𝒑1 = 1 : Coordinates of P with respect to 𝐗1 𝐘1
𝑦
P
2 𝑥2
𝒑 = 2 : Coordinates of P with respect to 𝐗 2 𝐘2
𝑦
𝐗2
𝑎11 𝑎21
Q 𝒂11 = 𝑎 , 𝒂12 = 𝑎 are coordinates of 𝒂1 and 𝒂2 with
𝒂2 21 22
respect to 𝐗1 𝐘1 .
𝒂1
𝐗1
O 1 𝑥1 1 1 𝑎11 𝑎21 𝑎11 𝑎21 𝑥 2
𝑂𝑃 = 1 = 𝑂𝑄 + 𝑂𝑃 =𝑥 2 𝑎 +𝑦 2 𝑎 = 𝑎 𝑎22 𝑦 2
𝑦 21 22 21

𝑎11 𝑎21
𝒑1 = 𝐀12 𝒑2 , where 𝐀12 = 𝑎 𝑎22 .
21
2-D Coordinate Transformation

𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃
For pure rotation: 𝒂1 = 𝒂2 =1, 𝒂1 ⊥ 𝒂2 , then 𝐀12 = and 𝐀12 𝑇 = 𝐀12 −1
𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃
An Example from Robot Kinematics
𝑥𝑒 = ℓ1 𝑐𝑜𝑠𝜃1 + ℓ2 𝑐𝑜𝑠 𝜃1 + 𝜃2
𝑦𝑒 = ℓ1 𝑠𝑖𝑛𝜃1 + ℓ2 𝑠𝑖𝑛 𝜃1 + 𝜃2

𝜃1 𝑥𝑒
𝜃2 𝑦𝑒 Forward kinematics

𝑥𝑒 𝜃1
𝑦𝑒 Inverse kinematics
𝜃2
Homogeneous Transformation Matrices (HTM’s)
𝑥𝑎
The coordinates of P with respect to 𝑂𝑎 − 𝑋𝑎 𝑌𝑎 𝑍𝑎 is 𝑦 𝑎
𝑍𝑎 𝑃 𝑧𝑎
𝑥𝑏
𝑍𝑏
The coordinates of P with respect to 𝑂𝑏 − 𝑋𝑏 𝑌𝑏 𝑍𝑏 is 𝑦 𝑏
𝑌𝑏 𝑧𝑏
𝒕
𝒃
𝑂𝑏 𝑂𝑎 𝑃 = 𝑂𝑎 𝑂𝑏 + 𝑂𝑏 𝑃
𝒏 𝑎 𝑎 𝑎
𝒏
𝑋𝑏
𝒙0 𝑥𝑎 𝑥𝑏
Therefore 𝑦 𝑎 = 𝒙0 𝑎 + 𝒏 𝑎 𝒕 𝑎 𝒃 𝑎 𝑦𝑏
𝑂𝑎 𝑌𝑎 𝑧𝑎 𝑧𝑏
𝑥𝑏
= 𝒙0 𝑎 +R 𝑦 𝑏
𝑧𝑏
𝑋𝑎 where R= 𝒏 𝒕 𝒃
𝑎 𝑎 𝑎
Homogeneous Transformation Matrices (HTM’s)
𝒙 𝑎 = 𝒙0 𝑎 +R 𝒙 𝑏

𝒏 𝑎 𝒕 𝑎 𝒃 𝑎 𝒙0 𝑎 𝒙 𝑎 𝒙 𝑏
Let 𝐀𝑎𝑏 = ቈ ൨, 𝒙 𝑎 = , and 𝒙 𝑏 =
0 0 0 1 1 1

Then
𝒙 𝑎 𝒏 𝒕 𝑎 𝒃 𝑎 𝒙0 𝑎 𝒙 𝑏
=ቈ 𝑎 ൨ , or 𝒙 𝑎
= 𝐀𝑎𝑏 𝒙 𝑏
1 0 0 0 1 1

Rotation matrix: R= 𝒏 𝑎 𝒕 𝑎 𝒃 𝑎 with 𝐑𝑇 R=R𝐑𝑇 =I and 𝐑𝑇 =𝐑−1


Homogeneous Transformation Matrices (HTM’s)

𝜃𝑖 𝑟𝑒𝑣𝑜𝑙𝑢𝑡𝑒 𝑗𝑜𝑖𝑛𝑡
𝑞𝑖 = ቊ
𝑑𝑖 𝑝𝑟𝑖𝑠𝑚𝑎𝑡𝑖𝑐 𝑗𝑜𝑖𝑛𝑡

∵ 𝐀𝑎𝑏 𝐀𝑏𝑎 = 𝐀𝑎𝑎 =𝐈


−1 𝐑𝑇 −𝐑𝑇 𝒙0
𝐀𝑎𝑏 = 𝐀𝑏𝑎 = 𝑎
𝐎1×3 1

This is because
𝒙 𝑎 = 𝒙0 𝑎 +R 𝒙 𝑏 𝒙 𝑏 = − 𝐑𝑇 𝒙0 𝑎 +𝐑𝑇 𝒙 𝑎

with 𝐑𝑇 =𝐑−1

You might also like