You are on page 1of 24

Lecture-2

Spatial Description & Rigid Body Transformation

Nebiyu Tenaye

Addis Ababa University


Addis Ababa Institute of Technology
School of Electrical and Computer Engineering

Introduction to Robotics
ECEG-5372
March 13, 2018
Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 1 / 24
Overview

Overview

1 Overview

2 Introduction
Basic Joints

3 Quick Math Review

4 Homogeneous Representation

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 2 / 24


Introduction

Definition of Kinematics

Kinematics is the science of motion that treats motion without


regard to the forces which cause it.
With in the science of kinematics, one studies, position, velocity,
acceleration, and all higher order derivatives of the position
variables (with respect to time or any other variable(s)).
Hence, the study of the kinematics of manipulators refers to all
the geometrical and time-based properties of the motion.
Manipulators consist of nearly rigid links, which are connected by
joints that allow relative motion of neighboring links. (More on
this on the next lecture)

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 3 / 24


Introduction Basic Joints

Basic Joints

Revolute Joint
1 DOF ( Variable - θ)

Prismatic Joint
1 DOF (linear) (Variables - d)

Spherical Joint
3 DOF ( Variables - θ1 , θ2 , θ3 )

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 4 / 24


Introduction Basic Joints

There are two kinematics topics


Forward Kinematics (angles to position)

What you are given: The length of each link


The angle of each joint
What you can find: The position of any point
(i.e. its (x, y, z) coordinates)

Inverse Kinematics (position to angles)

What you are given: The length of each link


The position of some point on the robot
What you can find: The angle of each joint
needed to obtain that position

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 5 / 24


Quick Math Review

Quick Math Review


Dot Product
Geometric Representation:

Ā · B̄ = kAkkBk cos θ

Matrix Representation:
   
a b
Ā · B̄ = x · x = ax bx + ay by
ay by

Unit Vector
Vector in the direction of a chosen vector
but whose magnitude is 1.


U¯B =
kBk
Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 6 / 24
Quick Math Review

Quick Matrix Review

Matrix Addition:
     
a b e f (a + e) (b + f )
+ =
c d g h (c + g) (d + h)
Matrix Multiplication:
An (m × n) matrix A and an (n × p) matrix B, can be multiplied since
the number of columns of A is equal to the number of rows of B.
Non-Commutative Multiplication
AB is NOT equal to BA
     
a b e f (ae + bg) (af + bh)
× =
c d g h (ce + dg) (cf + dh)

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 7 / 24


Quick Math Review

Basic Transformations
Moving Between Coordinate Frames

Translation along the X-Axis

Px = distance between the XY and N O coordinate planes.

Notation:
VX
   N  
V PX
V̄ XY = V̄ N O = P̄ =
VY VO 0
Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 8 / 24
Quick Math Review

Writing V̄ XY in terms of V̄ N O

PX + V N
 
XY
V̄ = = P̄ + V̄ N O
VO

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 9 / 24


Quick Math Review

Translation along the X-Axis and Y-Axis

 
P
P̄ XY
= X
PY

PX + V N
 
V̄ XY = P̄ + V̄ N O =
PY + V O

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 10 / 24


Quick Math Review

Using Basis Vectors


Basis vectors are unit vectors that point along a coordinate axis.

n̄ Unit vector along the N-Axis


ō Unit vector along the O-Axis
kV N O k Magnitude of the V N O vector

 N   NO
kV N O k cos θ
    NO 
NO V kV k cos θ V̄ · n̄
V̄ = O = N O = N O = N O
V kV k sin θ kV k cos(90 − θ) V̄ · ō

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 11 / 24


Quick Math Review

Rotation (around the Z-Axis)

θ = Angle of rotation between the XY and N O coordinate axis


 X  N
XY V NO V
V̄ = V̄ =
VY VO

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 12 / 24


Quick Math Review

x̄ Unit vector along X-Axis


V̄ Can be considered with re-
spect to the XY coordinates
or NO coordinates

kV̄ XY k = kV̄ N O k

V X = kV̄ XY k cos α = kV̄ N O k cos α = V̄ N O · x̄


= (V N × n̄ + V O × ō) · x̄
= V N (x̄ · n̄) + V O (x̄ · ō)
= V N (cos θ) + V O (cos(θ + 90))
= V N (cos θ) − V O (sin θ)

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 13 / 24


Quick Math Review

Similarly,

V Y = kV̄ N O k sin α = kV̄ N O k cos(90 − α) = V̄ N O · ȳ


= (V N × n̄ + V O × ō) · ȳ
= V N (ȳ · n̄) + V O (ȳ · ō)
= V N (cos(90 − θ)) + V O (cos θ)
= V N (sin θ) + V O (cos θ)

So,
V X = V N (cos θ) − V O (sin θ)
V Y = V N (sin θ) + V O (cos θ)

Written in Matrix Form

VX cos θ − sin θ V N
    
V̄ XY = =
VY sin θ cos θ VO
Rotation Matrix about the z-axis.
Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 14 / 24
Quick Math Review

VX cos θ − sin θ V N
      
XY PX
V̄ = = +
VY PY sin θ cos θ VO
(Note : Px , Py are relative to the original coordinate frame. Translation
followed by rotation is different than rotation followed by translation.)
Why?
In other words, knowing the coordinates of a point (V N , V O ) in some
coordinate frame (N O), you can find the position of that point relative
to your original coordinate frame (X 0 Y 0 ).
Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 15 / 24
Homogeneous Representation

Homogeneous Representation
Putting it all into a Matrix
From a translation and a rotation
 X   
cos θ − sin θ V N
 
V PX
V̄ XY = = +
VY PY sin θ cos θ VO
 X   
cos θ − sin θ 0 V N
 
V PX
=  V Y  =  PY  +  sin θ cos θ 0  V O 
1 1 0 0 1 1
 X    N
V cos θ − sin θ PX V
=  V Y  =  sin θ cos θ PY   V O 
1 0 0 1 1
 
Homogeneous Matrix for a cos θ − sin θ PX
Translation in XY plane, followed H =  sin θ cos θ PY 
by a Rotation around the z-axis. 0 0 1
Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 16 / 24
Homogeneous Representation

Rotation Matrices in 3D

 
cos θ − sin θ 0
RZ =  sin θ cos θ 0 ⇐= Rotation around the Z-Axis
0 0 1

 
cos θ 0 sin θ
RY =  0 1 0  ⇐= Rotation around the Y-Axis
− sin θ 0 cos θ

 
1 0 0
RX = 0 cos θ − sin θ ⇐= Rotation around the X-Axis
0 sin θ cos θ

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 17 / 24


Homogeneous Representation

H is a 4 × 4 matrix that can describe a translation, rotation, or both in


one matrix.  
1 0 0 PX
0 1 0 PY 
H= 0 0 1 PZ 

0 0 0 1

 
Translation without rotation nx ox ax 0
ny oy ay 0
H=
nz oz az

0
0 0 0 1

Rotation part:
Could be rotation around
z-axis, x-axis, y-axis or a
Rotation without translation combination of the three.
Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 18 / 24
Homogeneous Representation

V XY Z = H V N VO VA 1 ←− The (n, o, a) position of a


 
point relative to the current
coordinate frame you are in.

 
nx ox ax PX
 ny oy ay PY   N
V XY Z VO VA 1

nz oz az PZ  V
= 

0 0 0 1

V X = nx V N + ox V O + ax V A + PX
The rotation and translation part can be combined into a single homoge-
neous matrix IF and ONLY IF both are relative to the same coordinate
frame.
Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 19 / 24
Homogeneous Representation

Finding the Homogeneous Matrix


Example

 X
WI
   N
W Point relative Point relative W Point relative
W Y  to the X-Y-Z W J  to the I-J-K W O  to the N-O-A
WZ frame WK frame WA frame

 I
ni oi ai Pi W N
 
W
WI
      N 
Pi ni oi ai W  W J   nj oj aj Pj  W O 
 W J  =  Pj  +  nj oj aj  W O  ⇒ 
W K =nk ok ak Pk  W A 
  
WK Pk nk ok ak W A
1 0 0 0 1 1
Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 20 / 24
Homogeneous Representation

 X 
jx kx Tx W I
 
 X     I  W ix
W Tx ix jx kx W Y  J
 W Y  = Ty  + iy jy ky  W J  ⇒  Z  = iy
W jy ky Ty 
 W 
 
 W   iz jz kz Tz W K 
WZ Tz iz jz kz W K
1 0 0 0 1 1
 X    N 
Substituting
 I for W ix jx kx Tx ni oi ai Pi W
W  W Y  iy jy ky Ty  nj oj aj Pj  O
 W 
W J   W Z  = iz jz kz Tz nk
   
ok ak Pk  W A 
WK 1 0 0 0 1 0 0 0 1 1
Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 21 / 24
Homogeneous Representation

  
 X  N ix jx kx Tx ni oi ai Pi
W W iy jy ky Ty   nj oj aj Pj 
W Y  W O  H=  
iz jz kz Tz  nk ok ak Pk 
W Z  = H W A 
   
0 0 0 1 0 0 0 1
1 1 | {z }
Product of the two matrices

Notice that H can also be written as:

    
1 0 0 Tx ix jx kx 0 1 0 0 Pi ni oi ai 0
0 1 0 Ty  iy jy ky 0
 0 1 0 Pj 
  nj oj aj 0
H=
0
  
0 1 Tz  iz jz kz 0 0 0 1 Pk  nk ok ak 0
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1

H = (Translation relative to the XYZ frame) * (Rotation relative to the XYZ frame)
* (Translation relative to the IJK frame) * (Rotation relative to the IJK frame)

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 22 / 24


Homogeneous Representation

The Homogeneous Matrix is a concatenation of numerous translations


and rotations.

One more variation on finding H:


H= (Rotate so that the X-axis is aligned with T)
* (Translate along the new t-axis by kT k (magnitude of T))
* (Rotate so that the t-axis is aligned with P)
* (Translate along the p-axis by kP k)
* (Rotate so that the p-axis is aligned with the O-axis)
This method might seem a bit confusing, but its actually an easier way
to solve our problem given the information we have.
Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 23 / 24
Questions?

Nebiyu Tenaye (AAiT/SECE) Lecture-2 March 13, 2018 24 / 24

You might also like