Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

长安大学

Chang’an University

Introduction to Robotics

Homework 1

Student Name: Bersisa Milki Tadesse


Student Id: 2021122905

Submission Date: March 31, 2022


Homework 1

Question 1.1: A frame {B} and a frame {A} are initially coincident. Frame {B} is rotated
about 𝑌̂𝐵 by an angle 𝜃, and then rotated about the new 𝑍̂𝐵 by an angle 𝜙. Determine the
3×3 rotation matrix, 𝐵𝐴𝑅 , which will transform the coordinates of a position vector from 𝐵𝑃,
its value in frame {B}, into 𝐴𝑃, its value in frame {A}.

ANS:
Let {𝑀} be the intermediate frame after the first rotation:
𝐴
𝐵𝑅 = 𝑀𝐴𝑅 𝑀𝐵𝑅
we know that 𝑀𝐴𝑅 = 𝑅𝑦 (𝜃) and 𝑀𝐵𝑅 = 𝑅𝑧 (𝜙) Thus:
𝐴
𝐵𝑅 = 𝑅𝑦 (𝜃)𝑅𝑧 (𝜙)

𝑐𝜃 0 𝑠𝜃 𝑐𝜙 −𝑠𝜙 0 𝒄𝜽𝒄𝝓 −𝒄𝜽𝒔𝝓 𝒔𝜽


𝐴
𝐵𝑅 =[ 0 1 0 ] [𝑠𝜙 𝑐𝜙 0] = [ 𝒔𝝓 𝒄𝝓 𝟎]
−𝑠𝜃 0 𝑐𝜃 0 0 1 −𝒔𝜽𝒔𝝓 𝒔𝜽𝒔𝝓 𝒄𝜽

Question 1.2: We are given a single frame {A} and a position vector 𝐴𝑃 described in this
frame. We then transform 𝐴𝑃 by first rotating it about 𝑍̂𝐴 by an angle 𝜙, then rotating about
𝑌̂𝐴 by an angle 𝜃. Determine the 3×3 rotation matrix operator, R(𝜙, 𝜃), which describes this
transformation.

ANS:
Let’s say the first rotation converts 𝐴𝑃 → 𝐴𝑃′, and the second rotation converts 𝐴𝑃′ → 𝐴𝑃′′.
Then:
𝐴
𝑃′ = 𝑅𝑧 (𝜙) 𝐴𝑃
𝐴
𝑃′′ = 𝑅𝑦 (𝜃) 𝐴𝑃′
𝐴
𝑃′′ = 𝑅𝑦 (𝜃)𝑅𝑧 (𝜙) 𝐴𝑃
So, the result is:
𝒄𝜽𝒄𝝓 −𝒄𝜽𝒔𝝓 𝒔𝜽
𝑅(𝜙, 𝜃) = 𝑅𝑦 (𝜃)𝑅𝑧 (𝜙) = [ 𝒔𝝓 𝒄𝝓 𝟎]
−𝒔𝜽𝒔𝝓 𝒔𝜽𝒔𝝓 𝒄𝜽
NB: This is the same matrix as question 1.
Question 1.3: (a) Given a transformation matrix:
1 0 0 1
𝐵 0 cos 𝜃 −sin 𝜃 2]
𝐴𝑇 = [ 0 sin 𝜃 cos 𝜃 3
0 0 0 1
Find 𝐵𝐴𝑇

ANS:
𝐵 𝐵 𝑇
𝐵 𝐴𝑅
𝐵
𝑃𝐴𝑂𝑅𝐺 ] 𝐴 𝐴𝑅 − 𝐵𝐴𝑅 𝑇 ∙ 𝐵𝑃𝐴𝑂𝑅𝐺 ]
𝐴𝑇 =[ 𝐵𝑇 = 𝐵𝐴𝑇 −1 = [
0 0 0 1 0 0 0 1
𝟏 𝟎 𝟎 𝟏
𝐴 𝟎 𝒄𝜽 𝒔𝜽 −𝟐𝒄𝜽 − 𝟑𝒔𝜽]
𝐵𝑇 = [𝟎 −𝒔𝜽 𝒄𝜽 𝟐𝒔𝜽 − 𝟑𝒄𝜽
𝟎 𝟎 𝟎 𝟏
(b) Given 𝜃 = 45° and 𝐵𝑃 = [4 5 6]𝑇 , compute 𝐴𝑃

ANS:
1 0 0 1
1 0 0 1 1 11 1
0 −2( ) − 3( )
𝐴 0 𝑐𝜃 𝑠𝜃 −2𝑐𝜃 − 3𝑠𝜃] = √2 √2 √2 √2
𝐵𝑇 = [0 −𝑠𝜃 𝑐𝜃 2𝑠𝜃 − 3𝑐𝜃 1 1 1 1
0 0 0 1 0 − 2( ) − 3( )
√2 √2 √2 √2
[0 0 0 1 ]
1 0 0 1
1 1 5
0 −
𝐴 √2 √2 √2
𝐵𝑇 = 1 1 1
0 − −
√2 √2 √2
[0 0 0 1 ]
So, now using 𝐵𝐴𝑇 and 𝐵𝑃 , we can compute 𝐴𝑃:
𝐵 𝐵
𝐴 𝑃𝐴𝑂𝑅𝐺 ] [ 𝐵𝑃 ] = 𝐴𝑇 ∙ 𝐵𝑃
𝐴
𝑃(4×1) = [ 𝑃 ] = [ 𝐴𝑅 𝐵 (4×1)
1 0 0 0 1 1
1 0 0 1
1 1 5 4 𝟑
0 − 𝟔
𝐴
𝑃(4×1) = √2 √2 √2 [5] =
1 1 1 6 √𝟐
0 − − 𝟎
√2 √2 √2 1 [𝟏]
[0 0 0 1 ]
𝑻
𝑨
𝟔
𝑷 = [𝟑 𝟎]
√𝟐
Question 1.4: Given the following 3 × 3 matrix:
1 1
0
√2 √2
1 1 1
𝑅= −
2 √2 2
1 1 1
− −
[ 2 √2 2 ]
(a) Show that it is a rotation matrix.
ANS:
If R is a rotation matrix, 𝑅 𝑇 𝑅 = 𝐼
1 1 1 1 1
− − 0
√2 2 2 √2 √2
1 1 1 1 1 1 0 0
𝑅𝑇 𝑅 = 0 − − = [0 1 0 ]
√2 √2 2 √2 2
0 0 1
1 1 1 1 1 1
− −
[√2 2 2 ][ 2 √2 2 ]
So, it is a rotation matrix.
(b) Determine a unit vector that defines the axis of rotation and the angle (in degrees) of
rotation.
ANS:
𝑟11 𝑟12 𝑟13
𝑟
If 𝑅 = [ 21 𝑟22 𝑟23 ],
𝑟31 𝑟32 𝑟33
1 1 1
+ +2−1
𝑟 + 𝑟 + 𝑟 − 1
) = cos −1 (√2 √2
11 22 33
𝜃 = cos −1 ( )
2 2

𝟏 𝟏
𝜽 = 𝐜𝐨𝐬 −𝟏 ( − ) = 𝟔𝟐. 𝟖°
√𝟐 𝟒
1 1
− −
𝑟32 − 𝑟23 √2 2
1 1 1 1 −1.21
𝐴
𝐾= [𝑟13 − 𝑟31 ] = + = 0.56 [ 1.21 ]
2 sin 𝜃 𝑟 − 𝑟 2 sin 62.8° √2 2
21 12 −0.5
1
[ −2 − 0 ]
𝑨
𝑲 = [−𝟎. 𝟔𝟕𝟗 𝟎. 𝟔𝟕𝟗 −𝟎. 𝟐𝟖]𝑻
(c) What are the Euler parameters 𝜀1 , 𝜀2 , 𝜀3 , 𝜀4 of R?
ANS:
1 1 1 1 1
𝜀4 = √1 + 𝑟11 + 𝑟22 + 𝑟33 = √1 + + + = 𝟎. 𝟖𝟓𝟒
2 2 √2 √2 2
1 1
− −2
𝑟32 − 𝑟23
𝜀1 = = √2 = −𝟎. 𝟑𝟓𝟒
4𝜀4 4(0.854)
1 1
+2
𝑟13 − 𝑟31
𝜀3 = = √2 = 𝟎. 𝟑𝟓𝟒
4𝜀4 4(0.854)
1
𝑟21 − 𝑟12 −2 − 0
𝜀4 = = = −𝟎. 𝟏𝟒𝟔
4𝜀4 4(0.854)

You might also like