Introduction to Robotics
MEC281
Rotating Frames
Inner Product (Dot Product)
• Finding angle between
• 2 vectors
• 2 straight lines,
• angle between 2 intersecting planes, or
• angle between plane and straight line.
• Checking whether 2 vectors are perpendicular.
• Finding projection of a vector onto another unit vector.
• Calculating the projection of a vector onto another, the dot product can be
used to find the component of one vector that lies along another vector.
• Finding work done by a force.
Inner Product (Dot Product)
• Geometric Representation
• Matrix Representation
a.b =0
Position in 2D
Right-handed Coordinate Frame
Rotation in 2D
Coordinate System
• Two Frame have Same Origin
• 𝑖𝑥 , 𝑗𝑦 and 𝑘𝑧 represents unit vectors
along coordinates axes of Frame oxyz
• 𝑖𝑢 , 𝑗𝑣 and 𝑘𝑤 represents unit vectors
along coordinates axes of Frame ouvw
Coordinate System
• 𝑃𝑢𝑣𝑤 = 𝑃𝑢 𝑖𝑢 + 𝑃𝑣 𝑗𝑣 + 𝑃𝑤 𝑘𝑤
• 𝑃𝑥𝑦𝑧 = 𝑃𝑥 𝑖𝑥 + 𝑃𝑦 𝑗𝑦 + 𝑃𝑧 𝑘𝑧
• 𝑃𝑥𝑦𝑧 = 𝑅𝑃𝑢𝑣𝑤
• 𝑅=?!
Coordinate System
• 𝑃𝑥 = 𝑖𝑥 . 𝑃𝑢𝑣𝑤 = 𝑖𝑥 . 𝑃𝑢 𝑖𝑢 + 𝑖𝑥 . 𝑃𝑣 𝑗𝑣 + 𝑖𝑥 . 𝑃𝑤 𝑘𝑤
• 𝑃𝑦 = 𝑗𝑦 . 𝑃𝑢𝑣𝑤 = 𝑗𝑦 . 𝑃𝑢 𝑖𝑢 + 𝑗𝑦 . 𝑃𝑣 𝑗𝑣 + 𝑗𝑦 . 𝑃𝑤 𝑘𝑤
• 𝑃𝑧 = 𝑘𝑧 . 𝑃𝑢𝑣𝑤 = 𝑘𝑧 . 𝑃𝑢 𝑖𝑢 + 𝑘𝑧 . 𝑃𝑣 𝑗𝑣 + 𝑘𝑧 . 𝑃𝑤 𝑘𝑤
Coordinate System
• 𝑃𝑥 = 𝑖𝑥 . 𝑃𝑢𝑣𝑤 = 𝑖𝑥 . 𝑃𝑢 𝑖𝑢 + 𝑖𝑥 . 𝑃𝑣 𝑗𝑣 + 𝑖𝑥 . 𝑃𝑤 𝑘𝑤
• 𝑃𝑦 = 𝑗𝑦 . 𝑃𝑢𝑣𝑤 = 𝑗𝑦 . 𝑃𝑢 𝑖𝑢 + 𝑗𝑦 . 𝑃𝑣 𝑗𝑣 + 𝑗𝑦 . 𝑃𝑤 𝑘𝑤
• 𝑃𝑧 = 𝑘𝑧 . 𝑃𝑢𝑣𝑤 = 𝑘𝑧 . 𝑃𝑢 𝑖𝑢 + 𝑘𝑧 . 𝑃𝑣 𝑗𝑣 + 𝑘𝑧 . 𝑃𝑤 𝑘𝑤
𝑃𝑥 𝑖𝑥 . 𝑖𝑢 𝑖𝑥 . 𝑗𝑣 𝑖𝑥 . 𝑘𝑤 𝑃𝑢
• 𝑃𝑦 = 𝑗𝑦 . 𝑖𝑢 𝑗𝑦 . 𝑗𝑣 𝑗𝑦 . 𝑘𝑤 𝑃𝑣
𝑃𝑧 𝑘 𝑧 . 𝑖𝑢 𝑘𝑧 . 𝑗𝑣 𝑘 𝑧 . 𝑘𝑤 𝑃𝑤
Coordinate System
• 𝑃𝑥 = 𝑖𝑥 . 𝑃𝑢𝑣𝑤 = 𝑖𝑥 . 𝑃𝑢 𝑖𝑢 + 𝑖𝑥 . 𝑃𝑣 𝑗𝑣 + 𝑖𝑥 . 𝑃𝑤 𝑘𝑤
• 𝑃𝑦 = 𝑗𝑦 . 𝑃𝑢𝑣𝑤 = 𝑗𝑦 . 𝑃𝑢 𝑖𝑢 + 𝑗𝑦 . 𝑃𝑣 𝑗𝑣 + 𝑗𝑦 . 𝑃𝑤 𝑘𝑤
• 𝑃𝑥 = 𝑘𝑧 . 𝑃𝑢𝑣𝑤 = 𝑘𝑧 . 𝑃𝑢 𝑖𝑢 + 𝑘𝑧 . 𝑃𝑣 𝑗𝑣 + 𝑘𝑧 . 𝑃𝑤 𝑘𝑤
𝑃𝑥 𝑖𝑥 . 𝑖𝑢 𝑖𝑥 . 𝑗𝑣 𝑖𝑥 . 𝑘𝑤 𝑃𝑢
• 𝑃𝑦 = 𝑗𝑦 . 𝑖𝑢 𝑗𝑦 . 𝑗𝑣 𝑗𝑦 . 𝑘𝑤 𝑃𝑣
𝑃𝑧 𝑘𝑧 . 𝑖𝑢 𝑘𝑧 . 𝑗𝑣 𝑘𝑧 . 𝑘𝑤 𝑃𝑤
• 𝑃𝑥𝑦𝑧 = 𝑅𝑃𝑢𝑣𝑤
• 𝑃𝑢𝑣𝑤 = 𝑅 −1 𝑃𝑥𝑦𝑧
Coordinate System
• 𝑃𝑥 = 𝑖𝑥 . 𝑃𝑢𝑣𝑤 = 𝑖𝑥 . 𝑃𝑢 𝑖𝑢 + 𝑖𝑥 . 𝑃𝑣 𝑗𝑣 + 𝑖𝑥 . 𝑃𝑤 𝑘𝑤
• 𝑃𝑦 = 𝑗𝑦 . 𝑃𝑢𝑣𝑤 = 𝑗𝑦 . 𝑃𝑢 𝑖𝑢 + 𝑗𝑦 . 𝑃𝑣 𝑗𝑣 + 𝑗𝑦 . 𝑃𝑤 𝑘𝑤
• 𝑃𝑥 = 𝑘𝑧 . 𝑃𝑢𝑣𝑤 = 𝑘𝑧 . 𝑃𝑢 𝑖𝑢 + 𝑘𝑧 . 𝑃𝑣 𝑗𝑣 + 𝑘𝑧 . 𝑃𝑤 𝑘𝑤
𝑖𝑥 . 𝑖𝑢 𝑖𝑥 . 𝑗𝑣 𝑖𝑥 . 𝑘𝑤
• 𝑅 = 𝑗𝑦 . 𝑖𝑢 𝑗𝑦 . 𝑗𝑣 𝑗𝑦 . 𝑘𝑤
𝑘𝑧 . 𝑖𝑢 𝑘𝑧 . 𝑗𝑣 𝑘𝑧 . 𝑘𝑤
Coordinate System
𝑖𝑥 . 𝑖𝑢 𝑖𝑥 . 𝑗𝑣 𝑖𝑥 . 𝑘𝑤
𝑅 = 𝑗𝑦 . 𝑖𝑢 𝑗𝑦 . 𝑗𝑣 𝑗𝑦 . 𝑘𝑤
𝑘𝑧 . 𝑖𝑢 𝑘𝑧 . 𝑗𝑣 𝑘𝑧 . 𝑘𝑤
𝑖𝑢 . 𝑖𝑥 𝑖𝑢 . 𝑗𝑦 𝑖𝑢 . 𝑘𝑧
𝑅 −1 = 𝑗𝑣 . 𝑖𝑥 𝑗𝑣 . 𝑗𝑦 𝑗𝑣 . 𝑘𝑧
𝑘𝑤 . 𝑖𝑥 𝑘𝑤 . 𝑗𝑦 𝑘𝑤 . 𝑘𝑧
Dot Products are commutative
𝑖𝑥 . 𝑖𝑢 𝑗𝑦 . 𝑖𝑢 𝑘𝑧 . 𝑖𝑢
𝑅−1 = 𝑖𝑥 . 𝑗𝑣 𝑗𝑦 . 𝑗𝑣 𝑘𝑧 . 𝑗𝑣 = 𝑅𝑡
𝑖𝑥 . 𝑘𝑤 𝑗𝑦 . 𝑘𝑤 𝑘𝑧 . 𝑘𝑤
Direction Cosines System
𝑖𝑥 . 𝑖𝑢 𝑖𝑥 . 𝑗𝑣 𝑖𝑥 . 𝑘𝑤
𝑅 = 𝑗𝑦 . 𝑖𝑢 𝑗𝑦 . 𝑗𝑣 𝑗𝑦 . 𝑘𝑤
𝑘𝑧 . 𝑖𝑢 𝑘𝑧 . 𝑗𝑣 𝑘𝑧 . 𝑘𝑤
𝐴ҧ . 𝐵ത = 𝐴 𝐵 cos θ
• A is a unit vector --> magnitude =1
• B is a unit vector --> magnitude =1
Direction Cosines System
𝑖𝑥 . 𝑖𝑢 𝑖𝑥 . 𝑗𝑣 𝑖𝑥 . 𝑘𝑤
𝑅 = 𝑗𝑦 . 𝑖𝑢 𝑗𝑦 . 𝑗𝑣 𝑗𝑦 . 𝑘𝑤
𝑘𝑧 . 𝑖𝑢 𝑘𝑧 . 𝑗𝑣 𝑘𝑧 . 𝑘𝑤
𝑖𝑥 . 𝑖𝑢 = cos 𝛼𝑥 , 𝑖𝑥 . 𝑗𝑣 = cos 𝛽𝑥 , 𝑖𝑥 . 𝑘𝑤 = cos γ𝑥
𝑗𝑦 . 𝑖𝑢 = cos 𝛼𝑦 , 𝑗𝑦 . 𝑗𝑣 = cos 𝛽𝑦 , 𝑗𝑦 . 𝑘𝑤 = cos γ𝑦
𝑘𝑧 . 𝑖𝑢 = cos 𝛼𝑧 , 𝑘𝑧 . 𝑗𝑣 = cos 𝛽𝑧 , 𝑘𝑧 . 𝑘𝑤 = cos γ𝑧
Direction Cosines System
𝑖𝑥 . 𝑖𝑢 𝑖𝑥 . 𝑗𝑣 𝑖𝑥 . 𝑘𝑤
𝑅 = 𝑗𝑦 . 𝑖𝑢 𝑗𝑦 . 𝑗𝑣 𝑗𝑦 . 𝑘𝑤
𝑘𝑧 . 𝑖𝑢 𝑘𝑧 . 𝑗𝑣 𝑘𝑧 . 𝑘𝑤
𝑖𝑥 . 𝑖𝑢 = cos 𝛼𝑥 , 𝑖𝑥 . 𝑗𝑣 = cos 𝛽𝑥 , 𝑖𝑥 . 𝑘𝑤 = cos γ𝑥
𝑗𝑦 . 𝑖𝑢 = cos 𝛼𝑦 , 𝑗𝑦 . 𝑗𝑣 = cos 𝛽𝑦 , 𝑗𝑦 . 𝑘𝑤 = cos γ𝑦
𝑘𝑧 . 𝑖𝑢 = cos 𝛼𝑧 , 𝑘𝑧 . 𝑗𝑣 = cos 𝛽𝑧 , 𝑘𝑧 . 𝑘𝑤 = cos γ𝑧
cos 𝛼𝑥 cos 𝛽𝑥 cos γ𝑥
𝑅 = cos 𝛼𝑦 cos 𝛽𝑦 cos γ𝑦
cos 𝛼𝑧 cos 𝛽𝑧 cos γ𝑧
Special cases
• The coordinate system ouvw rotates an angle α about the ox axis
𝑃𝑥𝑦𝑧 = 𝑅𝑥,α . 𝑃𝑢𝑣𝑤
1 0 0
𝑅𝑥,α = 0 cos α − sin α
0 sin α cos α
Special cases
• The coordinate system ouvw rotates an angle β about the oy axis
𝑃𝑥𝑦𝑧 = 𝑅𝑦,β . 𝑃𝑢𝑣𝑤
cos β 0 sin β
𝑅𝑦,β = 0 1 0
− sin β 0 cos β
Special cases
• The coordinate system ouvw rotates an angle γ about the oz axis
𝑃𝑥𝑦𝑧 = 𝑅𝑧,γ . 𝑃𝑢𝑣𝑤
cos γ − sin γ 0
𝑅𝑧,γ = sin γ cos γ 0
0 0 1
Order of Rotation is Important
• 𝑅𝑥 𝑅𝑦 𝑅𝑧 ≠ 𝑅𝑧 𝑅𝑦 𝑅𝑥
• Matrices are not commutative
Frames !
Frames !
Why Frames
Why Frames
Frames
Frames
Why Frames
• Same Coordination with respect to Frame {C}
Frames
Example 1
• A point 𝑃𝑢𝑣𝑤 =(4, 3, 2) is attached to a rotating frame, the frame
rotates 60 degree about OZ axis of the reference frame. Find
the coordinates of the point relative to the reference frame
after the rotation.
• 𝑃𝑥𝑦𝑧 = 𝑅𝑧,60 𝑃𝑢𝑣𝑤
0.5 −0.866 0 4 −0.598
• 𝑃𝑥𝑦𝑧 = 0.866 0.5 0 3 = 4.964
0 0 1 2 2
Example 2
• A point 𝑃𝑥𝑦𝑧 =(4, 3, 2) is the coordinate with respect to the
reference coordinate system. Find the corresponding point
𝑃𝑢𝑣𝑤 with respect to the rotated ouvw coordinate system if it
has been rotated 60 degree about OZ axis
• 𝑃𝑢𝑣𝑤 = 𝑅𝑧,60 −1 𝑃𝑥𝑦𝑧 = 𝑅𝑧,60 𝑇 𝑃𝑥𝑦𝑧
0.5 0.866 0 4 4.598
• 𝑃𝑢𝑣𝑤 = −0.866 0.5 0 3 = −1.964
0 0 1 2 2
Example 3
• Find the resultant rotation matrix that
represents rotation of an angle ϕ about
the oy axis, followed by a rotation of
an angle θ about the ow axis,
followed by a rotation of an angle α
about the ou-axis.
• 𝑅 = 𝑅𝑦,ϕ 𝑅𝑤,θ 𝑅𝑢,α
Example 3
• Using C for cosine and S for sine functions
• 𝑅 = 𝑅𝑦,ϕ 𝑅𝑤,θ 𝑅𝑢,α
𝐶ϕ 0 𝑆ϕ 𝐶θ −𝑆θ 0 1 0 0
•𝑅= 0 1 0 𝑆θ 𝐶θ 0 0 𝐶α −𝑆α
−𝑆ϕ 0 𝐶ϕ 0 0 1 0 𝑆α 𝐶α
Example 3
• Using C for cosine and S for sine functions
• 𝑅 = 𝑅𝑦,ϕ 𝑅𝑤,θ 𝑅𝑢,α
𝐶ϕ𝐶θ −𝐶ϕ𝑆θ𝐶α − 𝑆ϕ𝑆α 𝐶ϕ𝑆θ𝑆α − 𝑆ϕ𝐶α
•𝑅= 𝑆θ 𝐶θ𝐶α −𝐶θ𝑆α
−𝑆ϕ𝐶θ −𝑆ϕ𝑆θ𝑆α + 𝐶ϕ𝑆α 𝑆ϕ𝑆θ𝑆α + 𝐶ϕ𝐶α
Wrap up
Multiplication !
• Reference Frame oxyz
• Moving (Rotating) Frame ouvw or n-o-a
• Combination
Multiplication !
• Reference Frame oxyz
• pre-multiplying
• 𝑃𝑥𝑦𝑧 = 𝑇𝑅𝑛𝑜𝑎
• 𝑃𝑛𝑒𝑤 = 𝑇𝑅𝑜𝑙𝑑
• First transformation goes to the right
Example 2.9 A point 𝑝[7,3,1]𝑇 is attached to a frame Fnoa
and is subjected to the following transformations:
1. A rotation of 90∘ about the z-axis
2. Followed by a translation of 4, −3,7
3. Followed by a rotation of 90∘ about the y-axis
𝑷𝒙𝒚𝒛 =𝑅𝑦,90 𝑡4,−3,7 𝑅𝑧,90 𝑷𝒏𝒐𝒂
Multiplication !
• Moving (Rotating) Frame ouvw or n-o-a
• post-multiplying
• 𝑃𝑥𝑦𝑧 = 𝑇𝑅𝑛𝑜𝑎
• First transformation goes to the left
Example 2.10 Assume that the same point as in Example 2.9
is now subjected to the same transformations, but all
relative to the current moving frame as:
1. A rotation of 90∘ about the a-axis
2. Then a translation of 4, −3,7 along n-, o-, a-axes
3. Followed by a rotation of 90∘ about the o-axis
𝑷𝒙𝒚𝒛 =𝑅𝑎,90 𝑡4,−3,7 𝑅𝑜,90 𝑷𝒏𝒐𝒂
Multiplication !
• Combination---> (XYZ) Frame (UVW)
First transformation goes to the right First transformation goes to the left
Multiplication !
• Combination---> (XYZ) Frame (UVW)
First transformation goes to the right First transformation goes to the left
Example 2.11 A frame B was
1. rotated about the x-axis 90∘ (Pre)
2. followed by a translation about the current o-axis of 2 inches (Post),
3. followed by a rotation about the a-axis of 90∘ (Post)
4. and a translation along the current y–axis of 3 inches. (Pre)
• Write an equation that describes the motions.
• Find the final location of a point 𝐵.𝑝[7,3,1]𝑇 relative to the reference frame.
• 𝑢
.𝑝 = 𝑢1𝑇𝐵 𝐵.𝑝
• 𝑢𝑝 = 𝑡0,3,0 𝑅𝑥,90 𝑩 𝑡0,2,0 𝑅𝑜,90 𝐵𝑝
. .
Multiplication !
• Combination
0 0 1 3
1 0 0 2
Example 2.12 A frame 𝐹𝑜𝑙𝑑 =
0 1 0 6
0 0 0 1
1. was rotated about the o-axis − 90∘ ,
2. followed by a rotation about the y-axis of 30∘ ,
3. followed by a translation of 3 units along the a-axis, and,
4. a rotation of 90∘ along the x-axis.
Find the transformed frame.
• 𝑢.𝑝 = 𝑢1𝑇𝐵 𝐵.𝑝
• 𝐹𝑛𝑒𝑤 = 𝑅𝑥,90 𝑅𝑦,30 𝑭 𝑅𝑜,−90 𝑡0,0,3 𝐵.𝑝
Rotation Sequence
XYX XYZ XZY XZX
YXY YXZ YZX YZY
ZXY ZXZ ZYX ZYZ
• Euler Angles
• Cardan Angles
Euler Angles
Euler Angles
• Any Two Independent orthonormal coordinate frames can be
related by a sequence of rotations (not more than 3) about
coordinate axes, where no two successive rotations may be
about the same axis
XYX XYZ XZY XZX
YXY YXZ YZX YZY
ZXY ZXZ ZYX ZYZ
Euler Angles
• ψ :The first angle of rotation in the Euler angle rotation sequence.
ψ measures the rotation about the Z-axis of the rotating coordinate
system
• θ :The second angle of rotation in the Euler angle rotation sequence.
θ measures the rotation about the X-axis of the rotating coordinate
system after the ψ rotation has been applied.
• ϕ :The third angle of rotation in the Euler angle rotation sequence.
ϕ measures the rotation about the Z-axis of the rotating coordinate
system after the ψ and θ rotations have been applied.
Euler Angles, Example (ZXZ)
• Euler angles are three
successive rotations ψ,θ and ϕ,
defined as if ψ is a rotation
about the oz axis, then θ about
the resulting ou axis and ϕ is a
rotating about the new ow axis.
Find the resulting rotating matrix
between the fixed frame oxyz
and the rotating frame ouvw
• 𝑅 = 𝑅𝑧,𝜓 𝑅𝑢,𝜃 𝑅𝑤,𝜙
Euler Angles, Example
• 𝑅 = 𝑅𝑧,𝜓 𝑅𝑢,𝜃 𝑅𝑤,𝜙
𝐶ψ −𝑆ψ 0 1 0 0 𝐶ϕ −𝑆ϕ 0
𝑅 = 𝑆ψ 𝐶ψ 0 0 𝐶θ −𝑆θ 𝑆ϕ 𝐶ϕ 0
0 0 1 0 𝑆θ 𝐶θ 0 0 1
𝐶ψ𝐶ϕ − 𝑆ψ𝐶θ𝑆ϕ −𝐶ψ𝑆ϕ − 𝑆ψ𝐶θ𝐶ϕ 𝑆ψ𝑆θ
𝑅 = 𝑆ψ𝐶ϕ + 𝐶ψ𝐶θ𝑆ϕ −𝑆ψ𝑆ϕ + 𝐶ψ𝐶θ𝐶ϕ −𝐶ψ𝑆θ
𝑆θ𝑆ϕ 𝑆θ𝐶ϕ 𝐶θ
Cardan Angles
XYX XYZ XZY XZX
YXY YXZ YZX YZY
ZXY ZXZ ZYX ZYZ
Bryant Angles (XYZ)
• Angle 1 The first angle of rotation in the Bryant angle rotation sequence.
Angle 1 measures the rotation about the X-axis of the rotating coordinate
system
• Angle 2 The second angle of rotation in the Bryant angle rotation
sequence.
Angle 2 measures the rotation about the Y-axis of the rotating coordinate
system after the Angle 1 rotation has been applied.
• Angle 3 The third angle of rotation in the Bryant angle rotation sequence.
Angle 3 measures the rotation about the Z-axis of the rotating coordinate
system after the Angle 1 and Angle 2 rotations have been applied.
Bryant Angles, Example
• Bryant angles are three
successive rotations ϕ1 , ϕ2 and
ϕ3 about the axes ox, ov, and ow
respectively. Find the rotation
matrix between the fixed frame
and the rotating frame
• 𝑅 = 𝑅𝑥,𝜙1 𝑅𝑣,𝜙2 𝑅𝑤,𝜙3
Bryant Angles, Example
• 𝑅 = 𝑅𝑥,𝜙1 𝑅𝑣,𝜙2 𝑅𝑤,𝜙3
1 0 0 𝐶𝜙2 0 𝑆𝜙2 𝐶𝜙3 −𝑆𝜙3 0
• 𝑅 = 0 𝐶𝜙1 −𝑆𝜙1 0 1 0 𝑆𝜙3 𝐶𝜙3 0
0 𝑆𝜙1 𝐶𝜙1 −𝑆𝜙2 0 𝐶𝜙2 0 0 1
𝐶𝜙2 𝐶𝜙3 −𝐶𝜙2 𝑆𝜙3 𝑆𝜙3
• 𝑅 = 𝑆𝜙1 𝑆𝜙2 𝐶𝜙3 + 𝐶𝜙1 𝑆𝜙3 −𝑆𝜙1 𝑆𝜙2 𝑆𝜙3 + 𝐶𝜙1 𝐶𝜙3 −𝑆𝜙1 𝐶𝜙2
−𝐶𝜙1 𝑆𝜙2 𝐶𝜙3 + 𝑆𝜙1 𝑆𝜙3 𝐶𝜙1 𝑆𝜙2 𝑆𝜙3 + 𝑆𝜙1 𝐶𝜙3 𝐶𝜙1 𝐶𝜙2
Roll, Pitch and Yaw (ZYX)
• Yaw, pitch, and roll angles in Motion Analysis results are the
sequence of Z-, negative Y-, and X-axis rotation angles
measured about the rotating coordinate system, relative to the
global coordinate system.
Roll, Pitch and Yaw
• Roll ϕ The first angle of rotation in the yaw, pitch, and roll
sequence. Roll measures the rotation about the Z-axis of the
rotating coordinate system relative to the global coordinate system.
• Pitch θ The second angle of rotation in the yaw, pitch, and roll
sequence. Pitch measures the rotation about the Y-axis of the
rotating coordinate system relative to the global coordinate system
after the roll rotation has been applied.
• Yaw The third angle of rotation in the yaw, pitch, and roll sequence.
Yaw measures the rotation about the X-axis of the rotating
coordinate system relative to the global coordinate system after the
roll and pitch rotations have been applied.
Roll, Pitch and Yaw
• Roll ϕ, pitch θ and yaw ψ are three
rotations about the axes oz, ov and ow
respectively. Find the rotation matrix
between the fixed frame oxyz and the
rotating frame ouvw.
• 𝑅 = 𝑅𝜙,𝑧 𝑅θ,𝑣 𝑅ψ,𝑢
Roll, Pitch and Yaw
• 𝑅 = 𝑅𝜙,𝑧 𝑅θ,𝑣 𝑅ψ,𝑢
𝐶𝜙 −𝑆𝜙 0 𝐶θ 0 𝑆θ 1 0 0
• 𝑅 = 𝑆𝜙 𝐶𝜙 0 0 1 0 0 𝐶ψ −𝑆ψ
0 0 1 −𝑆θ 0 𝐶θ 0 𝑆ψ 𝐶ψ
𝐶𝜙𝐶θ −𝑆𝜙𝐶ψ + 𝐶𝜙𝑆θ𝑆ψ 𝑆𝜙𝑆ψ + 𝐶𝜙𝑆θ𝐶ψ
• 𝑅 = 𝑆𝜙𝐶θ 𝐶𝜙𝐶ψ + 𝑆𝜙𝑆θ𝑆ψ −𝐶𝜙𝑆ψ + 𝑆𝜙𝑆θ𝐶ψ
−𝑆θ 𝐶θ𝑆ψ 𝐶θ𝐶ψ
Homogeneous Transformation Matrix
(HTM)
• W=Scaling factor 1x1
• F= Perspective transformation 1x3
• P= Position Vector 3x1
• R= Rotation matrix 3x3
Homogeneous Transformation Matrix
(HTM)
• The scaling factor is taken to be 1 and the elements of
perspective transformation are three zeros
• Perspective transformation accounts for perspective distortion, which happens when objects appear smaller as they move farther from the camera
• In robotics kinematics, the perspective transformation elements (ℎ31h 31 , ℎ32h 32 ) are always zero because there is no perspective distortion.
Example (Introduction to DH-Convention)
• The coordinate system 𝑜𝑒 𝑥𝑦𝑧 is produced by rotating and translating the coordinate
system 𝑜𝑏 𝑢𝑣𝑤.
• A Rotation of angle θ about the ow axis that 𝑜𝑏 𝑢 // 𝑜𝑒 𝑢,
• followed by a translation of r units along the 𝑜𝑏 𝑤 axis,
• translation of a units along the 𝑜𝑒 𝑥 axis, and
• a rotation of angle α about the 𝑜𝑒 𝑥 axis.
• Find the homogeneous transformation matrix and its inverse between these two
coordinate systems
• 𝑃𝑢 𝑃𝑣 𝑃𝑤 1 𝑡 = 𝑇 𝑃𝑥 𝑃𝑦 𝑃𝑧 1 𝑡
Example
• 𝑃𝑢 𝑃𝑣 𝑃𝑤 1 𝑡 = 𝑇 𝑃𝑥 𝑃𝑦 𝑃𝑧 1 𝑡
• 𝑇 = 𝑇𝑤,𝜃 𝑇𝑤,𝑟 𝑇𝑥,𝑎 𝑇𝑥,α
cos θ − sin θ 0 0 1 0 0 0 1 0 0 𝑎 1 0 0 0
sin θ cos θ 0 0 0 1 0 0 0 1 0 0 0 cos α − sin 𝛼 0
• 𝑇= ∗
0 0 1 0 0 0 1 𝑟 0 0 1 0 0 sin 𝛼 cos α 0
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
cos 𝜃 − cos 𝛼 sin 𝜃 sin 𝛼 cos 𝜃 𝑎 cos 𝜃
sin 𝜃 cos 𝛼 cos 𝜃 − sin 𝛼 sin 𝜃 𝑎 sin 𝜃
• 𝑇= =
0 sin 𝛼 cos 𝛼 𝑟
0 0 0 1
Example
• 𝑻 = 𝑻𝒘,𝜽 𝑻𝒘,𝒓 𝑻𝒙,𝒂 𝑻𝒙,𝜶
cos 𝜃 − cos 𝛼 sin 𝜃 sin 𝛼 cos 𝜃 𝑎 cos 𝜃
sin 𝜃 cos 𝛼 cos 𝜃 − sin 𝛼 sin 𝜃 𝑎 sin 𝜃
• 𝑇= =
0 sin 𝛼 cos 𝛼 𝑟
0 0 0 1
cos 𝜃 sin 𝜃 0 −𝑎
− cos 𝛼 sin 𝜃 cos 𝛼 cos 𝜃 sin 𝛼 −𝑟 cos 𝛼
• 𝑇 −1 = =
sin 𝛼 cos 𝜃 − sin 𝛼 sin 𝜃 cos 𝛼 −𝑟 cos 𝛼
0 0 0 1
• 𝑻−𝟏 = 𝑻−𝟏 −𝟏 −𝟏 −𝟏
𝒙,𝜶 𝑻𝒙,𝒂 𝑻𝒘,𝒓 𝑻𝒘,𝜽
Search
Gimble lock
Quatrain, Quaternion & Tertian
Self-reading Chapter 3
of
Principles of Robot
Modelling and Simulation
by Prof. Said Megahed
Position in 2D
Position in 2D
Position and Displacement
• The position of the origin of coordinate frame i relative to
coordinate frame j can be denoted by the 3×1 vector
Relative position in 2D
Relative position in 2D
2 Translation component and 1 Rotation component Relative to frame A
From World Frame to Car Frame
From World Frame to Car Frame
𝑤
1𝑃𝑑 = ?!
• We can’t add poses and vectors
• They are different things
From World Frame to Car Frame
𝑤
1𝑃𝑑 = 𝑤1ξ𝐶 . 𝐶1𝑃𝑑
. Transform vector from one frame
to another
Example
https://mecharithm.com/learning/lesson/homogenous-transformation-matrices-configurations-in-robotics-12
Example
Pose Algebra
Pose Algebra
Example
https://www.youtube.com/playlist?list=PLjx2FAhpTe3FGbcjBbxlhf56qVR0XbVNO
Example
Example
One More Time !
Rotation Matrix
• Rotate from Frame B to Frame A
Rotation Matrix
• Rotate From Frame A to Frame B
• The inverse is simply the transpose
Translation Matrix
• Only Ad vectors in the same (or parallel ) reference frames
Transformation Matrix
• Translate to frame V then rotation to frame B