You are on page 1of 48

UTM

ROBOTICS
SEM 4143

CHAPTER 2

Robot Kinematics
The Robot System
Kinematics Hardware
Mechanical Design
Actuators
Dynamics

Control System
Task Planning

Sensors
Software
Prof Dr Shamsudin Hj Mohd Amin 2
Introduction to Kinematics

Prof Dr Shamsudin Hj Mohd Amin 3


Robot Kinematics
– In order to control and programme a robot
we must have knowledge of both its spatial
arrangement and a means of reference to the
environment.
– KINEMATICS - the analytical study of the
geometry of motion of a robot arm:
• with respect to a fixed reference co-ordinate
system
• without regard to the forces or moments that
cause the motion.

Prof Dr Shamsudin Hj Mohd Amin 4


z
y Right-handed
Co-ordinate frame
x
Co-ordinate Frames
Camera Frame

Tool Frame

x
Link Frame
Goal Frame
x

x
Base
x Frame
5
Kinematic Relationship
– Between two frames we have a kinematic
relationship - basically a translation and a
rotation.

z
y
x
– This relationship is mathematically represented
by a 4 4 Homogeneous Transformation
Matrix.
Prof Dr Shamsudin Hj Mohd Amin 6
Homogeneous Transformations

r1 r2 r3 x
3 3 Rotational
Matrix r4 r5 r6 y 3 1 Translation

r7 r8 r9 z

0 0 0 1 Global Scale

1 3 Perspective

Prof Dr Shamsudin Hj Mohd Amin 7


Kinematic Considerations
• Using kinematics to describe the spatial
configuration of a robot gives us two
approaches:
• Forward Kinematics. (direct)
– Given the joint angles for the robot, what is the
orientation and position of the end effector?
• Inverse Kinematics.
– Given a desired end effector position what are the
joint angles to achieve this?

Prof Dr Shamsudin Hj Mohd Amin 8


Inverse Kinematics

• For a robot system the inverse kinematic


problem is one of the most difficult to solve.
• The robot controller must solve a set of non-
linear simultaneous equations.
• The problems can be summarised as:
– The existence of multiple solutions.
– The possible non-existence of a solution.
– Singularities.

Prof Dr Shamsudin Hj Mohd Amin 9


Multiple Solutions

Goal

“ This two link planar manipulator has


two possible solutions.
“ This problem gets worse with more
‘Degrees of Freedom’.
“ Redundancy of movement.

Prof Dr Shamsudin Hj Mohd Amin 10


Non Existence of Solution
Goal

“ A goal outside the workspace of the robot


has no solution.

“ An unreachable point can also be within


the workspace of the manipulator - physical
constraints.
“ A singularity is a place of acceleration
- trajectory tracking.

Prof Dr Shamsudin Hj Mohd Amin 11


Kinematics Control
• Kinematics is the first step towards robotic
control.

Cartesian Space Joint Space Actuator Space

z
y
x
12
Prof Dr Shamsudin Hj Mohd Amin 13
An Example - The PUMA 560
2

4 6
5 There are two more
joints on the end
1 effector (the gripper)
The PUMA 560 has SIX revolute joints
A revolute joint has ONE degree of freedom ( 1 DOF) that is
defined by its angle

Prof Dr Shamsudin Hj Mohd Amin 14


We are interested in 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. it’s (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 angles of each joint needed to obtain
that position
Quick Math Review
ax
Dot Product: ay
Geometric Representation:
bx
A
A B A B cosθ θ by

Matrix Representation: B

ax bx
A B a xb x ayby
ay by

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

Prof Dr Shamsudin Hj Mohd Amin 16


Quick Matrix Review

Matrix Multiplication:
An (m x n) matrix A and an (n x 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
Matrix Addition:
a b e f a e b f
c d g h c g d h

Prof Dr Shamsudin Hj Mohd Amin 17


Basic Transformations
Moving Between Coordinate Frames

Y Translation Along the X-Axis O

(VN,VO)

VO

P
N
X VN
Px
Px = distance between the XY and NO coordinate planes
XY VX VN Px
V V NO P
Notation: VY 0
VO

18
Writing V XY in terms of V NO
Y O

VO
P
N
X VN

PX V N
V XY P V NO
VO

Prof Dr Shamsudin Hj Mohd Amin 19


O

Translation along the X-Axis and Y-Axis


Y

VO

N
VN

XY
Px
X P
PY

PX V N
V XY P V NO
PY VO

Prof Dr Shamsudin Hj Mohd Amin 20


Using Basis Vectors
Basis vectors are unit vectors that point O

along a coordinate axis


n Unit vector along the N-Axis
o Unit vector along the N-Axis
VO
V NO Magnitude of the VNO vector
o
VN N
n

VN V NO cosθ V NO cosθ V NO n
V NO
VO V NO sinθ V NO cos(90 θ) V NO o

Prof Dr Shamsudin Hj Mohd Amin 21


Y

X
Rotation (around the Z-Axis) Y Z

VY

X
VX
= Angle of rotation between the XY and NO coordinate axis
VX VN
V XY V NO
VY VO

22
x
Y Unit vector along X-Axis
V
Can be considered with respect to
the XY coordinates or NO coordinates
V
V XY V NO
VY

X
VX

VX V XY cosα V NO cosα V NO x
X N O (Substituting for VNO using the N and O components of
V (V n V o) x the vector)

VX V N (x n ) V O (x o)
V N (cosθ) V O (cos(θ 90))
V N (cosθ) V O (sinθ)

Prof Dr Shamsudin Hj Mohd Amin 23


Similarly….

VY V NO sinα V NO cos(90 α) V NO y

VY (V N n V O o ) y
VY V N (y n ) V O (y o )
V N (cos(90 θ)) V O (cosθ)
V N (sinθ) V O (cosθ)
So…. VX V N (cosθ) V O (sinθ)
VY V N (sinθ) V O (cosθ) VX
V XY
Written in Matrix Form VY

VX cosθ sinθ V N
V XY
VY sinθ cosθ V O Rotation Matrix about the z-axis

Prof Dr Shamsudin Hj Mohd Amin 24


Y1

(VN,VO)
Y0
VNO

VXY

P X1

Translation along P followed by rotation by


X0

XY VX Px cosθ sinθ V N
V
VY Py sinθ cosθ V O
(Note : Px, Py are relative to the original coordinate frame. Translation followed by rotation is different
than rotation followed by translation.)
In other words, knowing the coordinates of a point (VN,VO) in some coordinate
frame (NO) you can find the position of that point relative to your original
coordinate frame (X0Y0).

Prof Dr Shamsudin Hj Mohd Amin 25


HOMOGENEOUS REPRESENTATION
Putting it all into a Matrix

VX Px cosθ sinθ V N What we found by doing a


XY
V translation and a rotation
VY Py sinθ cosθ V O

VX Px cosθ sinθ 0 VN
Padding with 0’s and 1’s
VY Py sinθ cosθ 0 VO
1 1 0 0 1 1

VX cosθ sinθ Px VN
VY sinθ cosθ Py VO
Simplifying into a matrix form
1 0 0 1 1

cosθ sinθ Px
H sinθ cosθ Py Homogenous Matrix for a Translation in XY plane,
0 0 1 followed by a Rotation around the z-axis

Prof Dr Shamsudin Hj Mohd Amin 26


Rotation Matrices in 3D ” OK,lets return from homogenous repn

cosθ sinθ 0 Rotation around the Z-Axis


Rz sinθ cosθ 0
0 0 1

cosθ 0 sinθ
Ry 0 1 0 Rotation around the Y-Axis
sinθ 0 cosθ

1 0 0
Rz 0 cosθ sinθ
Rotation around the X-Axis
0 sinθ cosθ

Prof Dr Shamsudin Hj Mohd Amin 27


Homogeneous Matrices in 3D
H is a 4x4 matrix that can describe a translation, rotation, or both in one matrix
O
1 0 0 Px
Y
0 1 0 Py
N
H
P 0 0 1 Pz
X A 0 0 0 1
Translation without rotation
Z nx ox ax 0
ny oy ay 0
Y H
O nz oz az 0
N 0 0 0 1
Rotation part:
X
Could be rotation around z-axis, x-axis,
y-axis or a combination of the three.
Rotation without translation
Z
A
Prof Dr Shamsudin Hj Mohd Amin 28
Homogeneous Continued….

VN
The (n,o,a) position of a point relative to the current
VO
V XY H A coordinate frame you are in.
V
1

nx ox ax Px VN
XY ny oy ay Py VO VX nxV N oxVO axV A Px
V
nz oz az Pz VA
0 0 0 1 1

The rotation and translation part can be combined into a single homogeneous matrix IF and ONLY
IF both are relative to the same coordinate frame.

Prof Dr Shamsudin Hj Mohd Amin 29


Finding the Homogeneous Matrix
EX.

Y WN
WO
WA
T
P
X

Z
W X WI WN
Point relative to the Point relative to the Point relative to the
W Y WJ I-J-K frame WO N-O-A frame
X-Y-Z frame
WZ WK WA

WI Pi ni oi ai WN WI ni oi ai Pi WN
WJ Pj nj oj aj WO WJ nj oj aj Pj WO
WK Pk nk ok ak WA WK nk ok ak Pk WA
1 0 0 0 1 1
30
WN
Y WO
WA
T
P
X

X I WX ix jx kx Tx WI
W Tx ix jx kx W
WY iy jy ky Ty WJ
WY Ty iy jy ky WJ
WZ iz jz kz Tz WK
WZ Tz iz jz kz Wk
1 0 0 0 1 1

I
WX ix jx kx Tx n i oi ai Pi WN
W
Substituting for WJ WY iy jy ky Ty n j oj aj Pj WO
WK WZ iz jz kz Tz n k ok ak Pk WA
1 0 0 0 1 0 0 0 1 1

Prof Dr Shamsudin Hj Mohd Amin 31


WX WN
ix jx kx Tx ni oi ai Pi
WY WO
H iy jy ky Ty nj oj aj Pj
WZ WA H Product of the two matrices
iz jz kz Tz n k ok ak Pk
1 1
0 0 0 1 0 0 0 1

Notice that H can also be written as:


1 0 0 Tx i x jx kx 0 1 0 0 Pi n i oi ai 0
0 1 0 Ty i y jy ky 0 0 1 0 Pj n j oj aj 0
H
0 0 1 Tz i z jz kz 0 0 0 1 Pk n k 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)

Prof Dr Shamsudin Hj Mohd Amin 32


The Homogeneous Matrix is a concatenation of numerous translations and rotations

WN
Y WO
WA
T
P
X

Z
One more variation on finding H:
H = (Rotate so that the X-axis is aligned with T)
* ( Translate along the new t-axis by || T || (magnitude of T))

* ( Rotate so that the t-axis is aligned with P)


* ( Translate along the p-axis by || P || )
* ( Rotate so that the p-axis is aligned with the O-axis)
This method might seem a bit confusing, but it’s actually an easier way to solve our
problem given the information we have. Here is an example…

33
F o r w a r d K i n e m a t i c s

Prof Dr Shamsudin Hj Mohd Amin 34


Forward Kinematics Definition
Kinematic parameters

Joint variables Orientation


and position

Applied in simulation and animation

Prof Dr Shamsudin Hj Mohd Amin 35


The Situation:
You have a robotic arm that
starts out aligned with the xo-axis.
You tell the first link to move by 1 and
the second link to move by 2.

The Quest:
What is the position of the end
of the robotic arm?

Solution:
1. Geometric Approach
This might be the easiest solution for the simple situation. However, notice
that the angles are measured relative to the direction of the previous link. (The first link
is the exception. The angle is measured relative to it’s initial position.) For robots with
more links and whose arm extends into 3 dimensions the geometry gets much more
tedious.

2. Algebraic Approach
Involves coordinate transformations.

36
Example Problem:
You have a three link arm that starts out
aligned in the x-axis. Each link has lengths l1, l2, l3,
respectively. You tell the first one to move by 1 ,
and so on as the diagram suggests. Find the
Y3
Homogeneous matrix to get the position of the
yellow dot in the X0Y0 frame.
3

Y2 2 X3 3
2 X2
H = Rz( 1 ) * Tx1(l1) * Rz( 2 ) * Tx2(l2) * Rz( 3 )

i.e. Rotating by 1 will put you in the X1Y1 frame. Translate in the along
Y0
1 the X1 axis by l1.
Rotating by 2 will put you in the X2Y2 frame.
and so on until you are in the X3Y3 frame.
1
X0 The position of the yellow dot relative to the X3Y3 frame is
(l1, 0). Multiplying H by that position vector will give you the
coordinates of the yellow point relative the the X0Y0 frame.

37
Slight variation on the last solution:
Make the yellow dot the origin of a new
coordinate X4Y4 frame
Y3

Y4
3

Y2 2 X3 3
2 X2
X4

H = Rz( 1 ) * Tx1(l1) * Rz( 2 ) * Tx2(l2) * Rz( 3 ) *


Y0 Tx3(l3)
1

This takes you from the X0Y0 frame to the X4Y4 frame.
1
X0
The position of the yellow dot relative to the X4Y4 frame is (0,0).
X 0
Y 0
H Notice that multiplying by the (0,0,0,1) vector will equal
Z 0
the last column of the H matrix.
1 1

Prof Dr Shamsudin Hj Mohd Amin 38


More on Forward Kinematics…

Denavit - Hartenberg Parameters

Prof Dr Shamsudin Hj Mohd Amin 39


Worked Example on
Forward Kinematics

Prof Dr Shamsudin Hj Mohd Amin 40


Inverse K i n e m a t i c s

Prof Dr Shamsudin Hj Mohd Amin 41


Inverse Kinematics Definition
Kinematic parameters

Orientation Joint variables


and position

Applied in control

Prof Dr Shamsudin Hj Mohd Amin 42


A Simple Example

Revolute and
Finding :
Prismatic Joints
y
Combined θ arctan( )
x
More Specifically:
(x ,
y) y arctan2() specifies that it’s in the first
θ arctan 2( ) quadrant
x
Y

S
1 Finding S:
X

S (x 2 y 2 )

Prof Dr Shamsudin Hj Mohd Amin 43


Inverse Kinematics of a Two Link
Manipulator
(x , Given: l1, l2 , x , y
y)

2
Find: 1, 2

l2 Redundancy:
A unique solution to this problem does
not exist. Notice, that using the ‚givens‛ two
solutions are possible.
l1
1 Sometimes no solution is possible.

(x ,
y)

44
The Geometric Solution
(x , y) Using the Law of Cosines:
l2
2
c2 a 2 b 2 2ab cos C
2 2
(x2 y 2 ) l1 l2 2l1l2 cos(180 θ 2 )
cos(180 θ 2 ) cos(θ 2 )
2 2
l1 x2 y 2 l1 l2
cos(θ 2 )
2l1l2
1
2 2
x2 y 2 l1 l2
Using the Law of Cosines: θ 2 arccos
sin B sin C 2l1l2
b c Redundant since could be in the first or
2
sinθ1 sin(180 θ 2 ) sin(θ 2 ) fourth quadrant.

l2 x 2 y2 x 2 y2
θ1 θ1 α Redundancy caused since 2 has two possible values

y
α arctan 2 l2 sin(θ 2 ) y
x θ1 arcsin arctan 2
x 2 y2 x
45
The Algebraic Solution
l2 c1 cosθ1
2
(x , y) c1 2 cos(θ 2 θ1 )
(1) x l1 c1 l2 c1 2

(2) y l1 s1 l2 sin1 2
l1 1 (3) θ θ1 θ 2

(1)2 (2) 2 x 2 y2
2 2 2 2 2 2 2
l1 c1 l2 (c1 2 ) 2l1l2 c1 (c1 2 ) l1 s1 l2 (sin1 2 ) 2 2l1l2 s1 (sin1 2 )
2 2
l1 l2 2l1l2 c1 (c1 2 ) s1 (sin1 2 )
2 2
l1 l2 2l1l2 c 2 Note :
Only Unknown
2 2 2 2 cos(a b) (cos a)(cosb) (sin a)(sin b)
x y l1 l2
θ2 arccos sin(a b) (cos a)(sin b) (cosb)(sin a)
2l1l2
46
Note :
cos(a b) (cosa)(cosb) (sin a)(sinb)
x l1 c1 l2 c1 2

l1 c1 l2 c1c 2 l2 s1s2
sin(a b) (cosa)(sinb) (cosb)(sin a)
c1 (l1 l2 c 2 ) s1 (l2 s2 )
We know what 2 is from the previous slide.
y l1 s1 l2 sin1 2
We need to solve for 1 . Now we have two
l1 s1 l2 s1c 2 l2 s 2 c1 equations and two unknowns (sin 1 and
c1 (l2 s 2 ) s1 (l1 l2 c 2 ) cos 1 )
x s1 (l 2 s 2 ) Substituting for c1 and simplifying many
c1
(l1 l 2 c 2 ) times
x s1 (l 2 s 2 )
y (l 2 s 2 ) s1 (l1 l2 c 2 ) Notice this is the law of cosines and can
(l1 l 2 c 2 )
be replaced by x2+ y2
1
x l2 s2 s1 (l12 l2 2 2l1l 2 c 2 )
(l1 l2 c 2 )

y(l1 l2 c 2 ) x l2 s2 y(l1 l2 c 2 ) x l2 s2
s1 2 2 θ1 arcsin
x y
x2 y2

Prof Dr Shamsudin Hj Mohd Amin 47


Worked Example on Inverse Kinematics

Prof Dr Shamsudin Hj Mohd Amin 48

You might also like