You are on page 1of 80

Introduction to ROBOTICS

Kinematics of Robot Manipulator

The City College of New York 1


Outline
• Review

• Robot Manipulators
– Robot Configuration
– Robot Specification
• Number of Axes, DOF
• Precision, Repeatability

• Kinematics
– Preliminary
• World frame, joint frame, end-effector frame
• Rotation Matrix, composite rotation matrix
• Homogeneous Matrix
– Direct kinematics
• Denavit-Hartenberg Representation
• Examples
– Inverse kinematics

The City College of New York 2


Review
• What is a robot?
– By general agreement a robot is:
• A programmable machine that imitates the actions or
appearance of an intelligent creature–usually a human.
– To qualify as a robot, a machine must be able to:
1) Sensing and perception: get information from its surroundings
2) Carry out different tasks: Locomotion or manipulation, do
something physical–such as move or manipulate objects
3) Re-programmable: can do different things
4) Function autonomously and/or interact with human beings
• Why use robots?
–Perform 4A tasks in 4D environments
4A: Automation, Augmentation, Assistance, Autonomous
4D: Dangerous, Dirty, Dull, Difficult

The City College of New York 3


Manipulators
• Robot arms, industrial robot
– Rigid bodies (links) connected
by joints
– Joints: revolute or prismatic
– Drive: electric or hydraulic
– End-effector (tool) mounted
on a flange or plate secured
to the wrist joint of robot

The City College of New York 4


Robotic Manipulators

• a robotic manipulator is a kinematic chain


– i.e. an assembly of pairs of rigid bodies that
can move respect to one another via a
mechanical constraint
• the rigid bodies are called links
• the mechanical constraints are called
joints

5
The City College of New York
A150 Robotic Arm

link 3
link 2

6
The City College of New York
Joints

• most manipulator joints are one of two types


1. revolute (or rotary)
– like a hinge
– allows relative rotation about a fixed axis between two links
• axis of rotation is the z axis by convention
2. prismatic (or linear)
– like a piston
– allows relative translation along a fixed axis between two links
• axis of translation is the z axis by convention
• our convention: joint i connects link i – 1 to link i
– when joint i is actuated, link i moves

7
The City College of New York
Joint Variables

• revolute and prismatic joints are one degree of


freedom (DOF) joints; thus, they can be described
using a single numeric value called a joint variable
• qi : joint variable for joint i
1. revolute
– qi = i : angle of rotation of link i relative to link i –
1
2. prismatic
– qi = di : displacement of link i relative to link i – 1

8
The City College of New York
Revolute Joint Variable

• revolute
– qi = i : angle of rotation of link i relative to link
link i
i–1

i
link i – 1

9
The City College of New York
Prismatic Joint Variable

• prismatic
– qi = di : displacement of link i relative to link i –
1
link i – 1 link i

di

10
The City College of New York
Common Manipulator Arrangments

• most industrial manipulators have six or


fewer joints
– the first three joints are the arm
– the remaining joints are the wrist
• it is common to describe such
manipulators using the joints of the arm
– R: revolute joint
– P: prismatic joint

11
The City College of New York
Articulated Manipulator
• RRR (first three joints are all revolute)
• joint axes
– z0 : waist
z0
– z1 : shoulder (perpendicular to z0) z1 z2

– z2 : elbow (parallel to z1) 2 3


shoulder
forearm
elbow
1

waist

12
The City College of New York
Spherical Manipulator
• RRP
• Stanford armz 0
z 1
– d3
http://infolab.stanford.edu/pub/voy/museum/pictures/display/robots/IMG_2404ArmFrontPeek
ingOut.JPG
2
shoulder z2

1

waist

13
The City College of New York
SCARA Manipulator
• RRP
• Selective Compliant
z
Articulated Robot for
z 1 2

Assemblyz 0
 2

– http://www.robots.epson.com/products/g-series.htm
d3

1

14
The City College of New York
Manipulators
• Robot Configuration:

Cartesian: PPP Cylindrical: RPP Spherical: RRP

Hand coordinate:

SCARA: RRP n: normal vector; s: sliding vector;


Articulated: RRR (Selective Compliance a: approach vector, normal to the
Assembly Robot Arm)
tool mounting plate
The City College of New York 15
Manipulators
• Motion Control Methods
– Point to point control
• a sequence of discrete points
• spot welding, pick-and-place, loading & unloading
– Continuous path control
• follow a prescribed path, controlled-path motion
• Spray painting, Arc welding, Gluing

The City College of New York 16


Manipulators
• Robot Specifications
– Number of Axes
• Major axes, (1-3) => Position the wrist
• Minor axes, (4-6) => Orient the tool
• Redundant, (7-n) => reaching around
obstacles, avoiding undesirable
configuration
– Degree of Freedom (DOF)
– Workspace how accurately a specified point
can be reached
– Payload (load capacity)
– Precision v.s. Repeatability how accurately the same position
Which one is more important? can be reached if the motion is
repeated many times
The City College of New York 17
What is Kinematics
• Forward kinematics
z

Given joint variables


q  (q1 , q2 , q3 , q4 , q5 , q6 , qn )
y

x
Y  ( x, y, z , O, A, T )

End-effector position and orientation, -Formula?

The City College of New York 18


What is Kinematics
• Inverse kinematics
End effector position z
and orientation
( x, y, z , O, A, T )
y

q  (q1 , q2 , q3 , q4 , q5 , q6 ,  qn ) x

Joint variables -Formula?

The City College of New York 19


Example 1

Forward kinematics y0
x1  l cos  y1
x1
y1  l sin 
l

Inverse kinematics 
1
x0
  cos ( x1 / l )

The City College of New York 20


Example II
• given the joint variables and dimensions of the links what
is the position and orientation of the end effector?

a2

2

a1

1

21
The City College of New York
Forward Kinematics
• choose the base coordinate frame of the robot
– we want (x, y) to be expressed in this frame
(x, y) ?

a2

2
y0

a1

1
x0

22
The City College of New York
Forward Kinematics
• notice that link 1 moves in a circle centered on the base
frame origin
(x, y) ?

a2

2
y0

a1

1 ( a1 cos 1 , a1 sin 1 )
x0

23
The City College of New York
Forward Kinematics
• choose a coordinate frame with origin located on joint 2
with the same orientation as the base frame
(x, y) ?

y1
a2

2
y0
1
a1 x1

1 ( a1 cos 1 , a1 sin 1 )
x0

24
The City College of New York
Forward Kinematics
• notice that link 2 moves in a circle centered on frame 1

(x, y) ?

y1
a2
( a2 cos (1 + 2),
2 a2 sin (1 + 2) )
y0
1
a1 x1

1
( a1 cos 1 , a1 sin 1 )
x0

25
The City College of New York
Forward Kinematics
• because the base frame and frame 1 have the same orientation, we
can sum the coordinates to find the position of the end effector in
the base frame (a1 cos 1 + a2 cos (1 + 2),
a1 sin 1 + a2 sin (1 + 2) )

y1
a2
( a2 cos (1 + 2),
2 a2 sin (1 + 2) )
y0
1
a1 x1

1
( a1 cos 1 , a1 sin 1 )
x0

26
The City College of New York
Forward Kinematics
• we also want the orientation of frame 2 with respect to
the base frame y2 x2
– x2 and y2 expressed in terms
of x0 and y0
a2

2
y0
1
a1

1
x0

27
The City College of New York
Forward Kinematics
x2 = (cos (1 + 2),
y2 x2
sin (1 + 2) )
y2 = (-sin (1 + 2),
cos (1 + 2) )
a2

2
y0
1
a1

1
x0

28
The City College of New York
Inverse Kinematics
• given the position (and possibly y2 x2
the orientation) of the end
(x, y)
effector, and the dimensions
of the links, what are the joint a
2
variables?
2 ?
y0

a1

1 ?
x0

29
The City College of New York
Inverse Kinematics
• harder than forward kinematics because there is often
more than one possible solution
(x, y)

a2

y0

a1

x0

30
The City College of New York
Inverse Kinematics
law of2 cosines
b  a1  a2  2a1a2 cos(   2 )  x 2  y 2
2 2

(x, y)

a2
b
2 ?
y0

a1

x0

31
The City College of New York
Inverse Kinematics
x 2  y 2  a12  a22
 cos(   2 ) 
2a1a2
and we have the trigonometric identity

 cos(   2 )  cos( 2 )
therefore,

x 2  y 2  a12  a22
cos  2   C2
2a1a2

We could take the inverse cosine, but this gives only one of the two solutions.

32
The City College of New York
Inverse Kinematics
Instead, use the two trigonometric identities:
sin 
sin 2   cos 2  2  1 tan  
cos 

to obtain
2
 1  C 2
 2  tan 1
C2
which yields both solutions for 2 . In many programming languages you would use the
four quadrant inverse tangent function atan2

c2 = (x*x + y*y – a1*a1 – a2*a2) / (2*a1*a2);


s2 = sqrt(1 – c2*c2);
theta21 = atan2(s2, c2);
theta22 = atan2(-s2, c2);

33
The City College of New York
Inverse Kinematics
 y 1  a2 sin  2 
1  tan    tan 
1

x  a1  a2 cos 2 

34
The City College of New York
Preliminary
• Robot Reference Frames
– World frame
– Joint frame
z
– Tool frame y
z x
y T P

W
x
R

The City College of New York 35


Points and Vectors

• point : a location in space


• vector : magnitude (length) and direction
p
between two points
v
q

36
The City College of New York
Coordinate Frames

• choosing a frame (a point and two


perpendicular vectors of unit0 length) allows
us to assign coordinates p
0 4
p  
ŷ0 q0 2.5
0 2
q  
x̂0 1.5
0 o0 0 0  2
0
v  p q   
1 
37
The City College of New York
Coordinate Frames

• the coordinates change depending on the


choice of frame 1
p

1 o1
ŷ1  0.5
1
p  
q1  4 
x̂1 1 0.5
q  
2
1 1 1  1
v  p q   
2
38
The City College of New York
Preliminary
• Coordinate Transformation
– Reference coordinate frame
OXYZ z
– Body-attached frame O’uvw P
Point represented in OXYZ:
T y
Pxyz  [ p x , p y , p z ] w
 v
Pxyz  p x i x  p y jy  p z k z
x

Point represented in O’uvw:
O, O’
u
Puvw  pu i u  pv jv  pw k w
Two frames coincide ==> pu  p x pv  p y pw  p z
The City College of New York 39
Preliminary
Properties: Dot Product
x y
Let and be arbitrary vectors in R 3
and  be
the angle from x to y , then
x  y  x y cos 
Properties of orthonormal coordinate frame
• Mutually perpendicular • Unit vectors
  
i  j 0 | i | 1
  
i k  0 | j | 1
  
k j 0 | k | 1
The City College of New York 40
Preliminary
• Coordinate Transformation
– Rotation only z
P

Pxyz  p x i x  p y jy  p z k z
 y
Puvw  pu i u  pv jv  pw k w w v
u
Pxyz  RPuvw x

How to relate the coordinate in these two frames?

The City College of New York 41


Preliminary
• Basic Rotation
– p x , p y, and p z represent the projections of P
onto OX, OY, OZ axes, respectively

– Since P  pu i u  pv jv  pw k w

p x  i x  P  i x  i u pu  i x  jv pv  i x  k w pw
p y  jy  P  jy  i u pu  jy  jv pv  jy  k w pw

p z  k z  P  k z  i u pu  k z  jv pv  k z  k w pw

The City College of New York 42


Preliminary
• Basic Rotation Matrix
 px   i x  i u i x  jv i x  k w   pu 
 p    j i j y  jv  
j y  k w   pv  
 y  y u
 p z  k z  i u k z  jv k z  k w   pw 
– Rotation about x-axis with 
z
w
1 0 0  P v

Rot ( x, )  0 C 
 S 

0 S C  y
u
x
The City College of New York 43
Preliminary
• Is it True?
– Rotation about x axis with 
 p x  1 0 0   pu 
 p   0 cos   
 sin    pv  
 y  z
 p z  0 sin  cos    pw  w
P v
p x  pu

p y  pv cos   pw sin 
y
p z  pv sin   pw cos  u
x
The City College of New York 44
Basic Rotation Matrices
– Rotation about x-axis with 
1 0 0 
Rot ( x, )  0 C  S 
0 S C 
– Rotation about y-axis with 
 C 0 S 
Rot ( y, )   0 1 0 
 S 0 C 

– Rotation about z-axis with 


C  S 0
Pxyz  RPuvw Rot ( z ,  )   S C 0
 0 0 1

The City College of New York 45


Preliminary
• Basic Rotation Matrix
 i x  i u i x  jv i x  k w 
R   jy  i u jy  jv jy  k w  Pxyz  RPuvw
k z  i u k z  jv k z  k w 
– Obtain the coordinate of Puvw from the coordinate
of Pxyz Dot products are commutative!

 pu   i u  i x i u  jy i u  k z   px 
 p    j i jv  j y

jv  k z   p y  Puvw  QPxyz
 v  v x
 pw  k w  i x k w  jy k w  k z   p z 
Q  R 1  R T
QR  R T R  R 1 R  I 3 <== 3X3 identity matrix

The City College of New York 46


Properties of Rotation Matrices
• RT = R-1
• the columns of R are mutually orthogonal
• each column of R is a unit vector
• det R = 1 (the determinant is equal to 1)

47 05/13/23
The City College of New York
Example
• A point auvw  (4,3,2) is attached to a rotating frame,
the frame rotates 60 degree about the OZ axis of
the reference frame. Find the coordinates of the
point relative to the reference frame after the
rotation.
a xyz  Rot ( z ,60)auvw
 0.5  0.866 0 4  0.598
 0.866 0.5 0 3   4.964 
 0 0 1 2  2 

The City College of New York 48


Example
• A point a xyz  (4,3,2) is the coordinate w.r.t. the
reference coordinate system, find the
corresponding point auvw w.r.t. the rotated
OU-V-W coordinate system if it has been
rotated 60 degree about OZ axis.

auvw  Rot ( z ,60)T a xyz


 0.5 0.866 0 4  4.598 
  0.866 0.5 0 3   1.964
 0 0 1 2  2 

The City College of New York 49


Composite Rotation Matrix
• A sequence of finite rotations
– matrix multiplications do not commute
– rules:
• if rotating coordinate O-U-V-W is rotating about
principal axis of OXYZ frame, then Pre-multiply
the previous (resultant) rotation matrix with an
appropriate basic rotation matrix
• if rotating coordinate OUVW is rotating about its
own principal axes, then post-multiply the
previous (resultant) rotation matrix with an
appropriate basic rotation matrix

The City College of New York 50


Example
• Find the rotation matrix for the following
operations:
R  Rot ( y,  ) I 3 Rot ( w, ) Rot (u ,  )
Rotation  about OY axis
 C 0 S  C  S 0 1 0 0 
Rotation  about OW axis   0 1 0   S C 0 0 C  S 
Rotation  about OU axis - S 0 C   0 0 1 0 S C 
 CC SS  CSC CSS  SC 
  S CC  CS 

Answer...  SC SSC  CS CC  SSS 

Pre-multiply if rotate about the OXYZ axes


Post-multiply if rotate about the OUVW axes
The City College of New York 51
Translation

ŷ0 ŷ1

x̂0 x̂1
o0 o1
0 
1

 3 0
o   1
 0
• suppose we are given o1 expressed in {0}
52
The City College of New York
Translation 1

ŷ0 ŷ1

x̂0 x̂1
o0 o1
0 
1

0  3 0   3
0 0
d  o o       
1 1 0
0   0  0 
• the location of {1} expressed in {0}
53
The City College of New York
Translation 1
i
d
1. the translation vector j can be
interpreted as the location of frame {j}
expressed in frame {i}

54
The City College of New York
Translation 2
a point expressed
in frame {1}

ŷ0 ŷ1 1


1
p  
1
x̂0 x̂1
o0 o1
0 
1

0 3 1 4


0 1
p d  p     
1
0 1 1
• p1 expressed in {0}
55
The City College of New York
Translation 2
i
2. the translation vector d can be j

interpreted as a coordinate
transformation of a point from frame {j} to
frame {i}

56
The City College of New York
Translation 3

 1 ŷ0  2
0 0
p   q  
1 1 
x̂0
o0
0

0 3  1 2
0
q d  p     
0   1  1 
• q0 expressed in {0}
57
The City College of New York
Translation 3
3. the translation vector d can be
interpreted as an operator that takes a
point and moves it to a new point in the
same frame

58
The City College of New York
Coordinate Transformations
• position vector of P
in {B} is transformed
to position vector of P
in {A}

• description of {B} as
seen from an observer
in {A}

Rotation of {B} with respect to {A}

Translation of the origin of {B} with respect to origin of {A}


The City College of New York 59
Coordinate Transformations
• Two Special Cases
r A  ARB r B  r A
P P o'

1. Translation only
– Axes of {B} and {A} are
parallel A
RB  1

2. Rotation only
– Origins of {B} and {A}
are coincident A
ro'  0
The City College of New York 60
Homogeneous Representation
• Coordinate transformation from {B} to {A}
A A B A
rP  RB rP  ro'

 rPA   A RB roA'   rPB 


   
 1   01 3 1  1 
• Homogeneous transformation matrix
Rotation
A
 RB
A
r   R3 3
A
o' P31  matrix
TB    
 01 3 1  0 1  Position
vector
Scaling
The City College of New York 61
Homogeneous Transformation
• Special cases
1. Translation

A
 I 3 3 roA' 
TB   
 01 3 1

2. Rotation

A  A
RB 031 
TB   
 013 1 

The City College of New York 62


Example
• Translation along Z-axis with h:
1 0 0 0  x  1 0 0 0  pu   pu 
0 1 0 0   y  0 1 0 0  pv   pv 
Trans ( z , h)     
0 0 1 h  z  0 0 1 
h pw    pw  h 
        
0 0 0 1  1  0 0 0 1  1   1 
z z P
P
w y
y
w v
v
x O, O’
u x
h
O, O’
u
The City College of New York 63
Example
• Rotation about the X-axis by
1 0 0 0  x  1 0 0 0  pu 
 0 C 0  y   0 C
 S  S 0  pv 
Rot ( x,  )    
0 S C 0  z  0 S C 0  pw 
      
0 0 0 1  1  0 0 0 1  1 
z
w
P v

y
u
x
The City College of New York 64
Homogeneous Transformation
• Composite Homogeneous Transformation
Matrix
• Rules:
– Transformation (rotation/translation) w.r.t
(X,Y,Z) (OLD FRAME), using pre-
multiplication
– Transformation (rotation/translation) w.r.t
(U,V,W) (NEW FRAME), using post-
multiplication

The City College of New York 65


Example
• Find the homogeneous transformation matrix
(T) for the following operations:
Rotation  about OX axis
Translation of a along OX axis
Translation of d along OZ axis
Rotation of  about OZ axis
T  Tz , Tz ,d Tx ,aTx , I 44
Answer : C  S 0 0 1 0 0 0  1 0 0 a  1 0 0 0
 S C 0 0 0 1 0 0  0 1 0 0  0 C  S 0

 0 0 1 0  0 0 1 d  0 0 1 0  0 S C 0
    
 0 0 0 1  0 0 0 1  0 0 0 1  0 0 0 1

The City College of New York 66


Homogeneous Representation
• A frame in space (Geometric
Interpretation) P( px , p y , pz )
z a (z’)
 R33 P31  s(y’)
F  
 0 1  n (X’)
y
 nx sx ax px 
n sy ay p y 
F  y
 nz sz az pz  x
 
0 0 0 1
Principal axis n w.r.t. the reference coordinate system

The City College of New York 67


Homogeneous Transformation
• Translation a
s
1 0 0 d x   nx s x ax px  z n
0 1 0 d y  n y s y ay p y 
a
Fnew    s
0 0 1 d z  nz s z
 az pz 
    n
0 0 0 1 0 0 0 1
 nx sx ax px  d x  y
n s y a y p y  d y 
 y
 nz sz az pz  d z 
 
0 0 0 1 

Fnew  Trans (d x , d y , d z )  Fold


The City College of New York 68
Homogeneous Transformation
Composite Homogeneous Transformation Matrix
z1 z2 y2

y1 x2
z0 0
A1 1
A2
y0
x1

x0
?
i 1
Ai Transformation matrix for
adjacent coordinate frames

0
A2  0A1 1 A2 Chain product of successive
coordinate transformation matrices

The City College of New York 69


Example
• For the figure shown below, find the 4x4 homogeneous transformation
matrices i 1 Ai and 0 Ai for i=1, 2, 3, 4, 5
 n s a p   1 0 0 0 
x x x x
c
n s a   0 0 1 e  c 
 py  0 A   
z3 F y y y
1
 0 1 0 a  d 
b y3 x  nz s z a z p z   
z5
3
   0 0 0 1 
0 0 0 1 
d

x5 0  1 0 b 
y5 z4 0 0  1 a  d 
e 1
A2   
a x4 y4 z2 1 0 0 0 
x2  
 0 0 0 1 
z1 x1 y2
z0 0 1 0 b 
y1  1 0 0 e  c 
x0
y0 0
Can you find the answer by observation basedA2  
0 0 1 0 
on the geometric interpretation of  
homogeneous transformation matrix? 0 0 0 1 
The City College of New York 70
Orientation Representation
 R33 P31 
F  
 0 1 
• Rotation matrix representation needs 9
elements to completely describe the
orientation of a rotating rigid body.
• Any easy way?

Euler Angles Representation

The City College of New York 71


Orientation Representation
• Euler Angles Representation (  , ,  )
– Many different types
– Description of Euler angle representations

Euler Angle I Euler Angle II Roll-Pitch-Yaw


Sequence  about OZ axis  about OZ axis  about OX axis
of  about OU axis  about OV axis  about OY axis
Rotations  about OW axis  about OW axis  about OZ axis

The City College of New York 72


Euler Angle I, Animated

w'= z

w'"= w"
 v'"
v"

v'
y

u'"

u' =u"
x

The City College of New York 73


Orientation Representation
• Euler Angle I
 cos   sin  0 1 0 0 
   
Rz   sin  cos  0 , Ru '   0 cos   sin  ,
 0 0 1   0 sin  cos  
 
 cos   sin  0
 
Rw''   sin  cos  0
 0 0 1 

The City College of New York 74


Euler Angle I
Resultant eulerian rotation matrix:

R  Rz Ru ' Rw''


 cos  cos   cos  sin  
 sin  sin  
  sin  sin  cos  sin  cos  cos 
 
 
 sin  cos   sin  sin   cos  sin  
  cos  sin  cos  cos  cos  cos 
 
 
 sin  sin  cos  sin  cos 
 
The City College of New York 75
Euler Angle II, Animated

w'= z

w"'= w" 

 v"'
 v' =v"
y
u"'
u"
Note the opposite u'
(clockwise) sense of the x
third rotation, .
The City College of New York 76
Orientation Representation
• Matrix with Euler Angle II
  sin  sin   sin  cos  
 cos  sin  
  cos  cos  cos  sin  cos  cos 
 
 
 cos  sin  cos  cos  sin  sin  
  sin  cos  cos  sin  cos  cos 
 
 cos 
  cos  sin  sin  sin 
 

Quiz: How to get this matrix ?


The City College of New York 77
Orientation Representation
• Description of Roll Pitch Yaw
Z

 Y

X

Quiz: How to get rotation matrix ?

The City College of New York 78


Inverse Transformation
• the inverse of a transformation undoes the
original transformation
– if
 R d
T  
0 0 0 1 

– then
1  R T
 R T
d
T  
0 0 0 1 
79
The City College of New York
Thank you!
Homework 1 is posted on the web.

Next class: kinematics II


z
y
z
y x
z z
x y
y x

x
The City College of New York 80

You might also like