Robotics 2kinematics
Robotics 2kinematics
1
Review of Fundamentals
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?
–To Perform 4A tasks in 4D environments
4A: Automation, Augmentation, Assistance, Autonomous
4D: Dangerous, Dirty, Dull, Difficult
2
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
3
Manipulators
Robot Configuration:
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
4
Application of 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
5
Specifications
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
Payload (load capacity) Which one is more important?
Precision v.s. Repeatability
6
Robot kinematics
Kinematics –study of motion with out regard
to the force generating it
In robots
Forward kinematics
Deals with determination of position and orientation
of end effector as a function of joint positions
Inverse kinematics
Deals with determination of joint positions for a
given end effector position and orientation
7
Robot Kinematics
Forward Kinematics:
to determine where the robot’s hand is?
(If all joint variables are known)
Inverse Kinematics:
to calculate what each joint variable is?
(If we desire that the hand be
located at a particular point)
8
Forward kinematics
9
Kinematics Model
Forward (direct) Kinematics
q (q1 , q2 , qn ) z
Joint Position and Orientation
variables of the end-effector
Direct Kinematics
Inverse Kinematics x
Y ( x, y, z, , , )
Inverse Kinematics
10
A point P in space :
3 coordinates relative to a reference frame
^ ^ ^
P a x i by j c z k
A Vector P in space :
3 coordinates of its tail and of its head
__ ^ ^ ^
P a x i by j c z k
x
__ y
P
z
w 11
Frame of Reference
Representation of a Frame at the
Origin of a Fixed-Reference Frame
nx ox a x
F n y o y a y
nz oz a z
nx ox ax Px
n oy ay Py
F y
nz oz az Pz
0 0 0 1
12
Representation of a Rigid Body
nx ox ax Px
n oy ay Py
Fobject y
nz oz az Pz
0 0 0 1
13
Homogeneous Transformation Matrices
A transformation matrices must be in square form for the
following reasons:
nx ox ax Px
n oy ay Py
F y
nz oz az Pz
0 0 0 1
14
Transformations
A transformation is defined as making a movement in space.
• A pure translation.
• A pure rotation about an axis.
• A combination of translation or rotations.
1 0 0 dx
0 1 0 d y
T
0 0 1 dz
0 0 0 1
15
Pure Rotation about an Axis
Assumption : The frame is at the origin of the reference frame
and parallel to it.
16
Inverse of Transformation Matrices
Inverse of a matrix calculation steps :
• Calculate the determinant of the matrix.
• Transpose the matrix.
• Replace each element of the transposed matrix by its own
minor(adjoint matrix).
• Divide the converted matrix by the determinant.
1 0 0 Px
0 1 0 Py
R
TP Tcart
0 0 1 Pz
0 0 0 1
18
Cylindrical Coordinate
2 Linear translations and 1 rotation
• translation of r along the x-axis
• rotation of about the z-axis
• translation of l along the z-axis
C S 0 rC
S C 0 rS
R
TP Tcyl
0 0 1 l
0 0 0 1
Cylindrical Coordinates.
19
Spherical Coordinates
2 Linear translations and 1 rotation
• translation of r along the z-axis
• rotation of about the y-axis
• rotation of along the z-axis
C C S S C rS C
C S C S S rS S
TP Tsph
R
S 0 C rC
0 0 0 1
Spherical Coordinates.
20
Forward Kinematics
Forward kinematics
z
x
Y ( x, y, z, O, A, T )
End-effector position and orientation, -Formula?
21
Inverse Kinematics
Inverse kinematics
z
End effector position
and orientation
( x, y, z, O, A, T )
y
q (q1 , q2 , q3 , q4 , q5 , q6 , qn ) x
Inverse kinematics
x0
cos ( x0 / l )
1
23
24
Preliminary
W
x
R
25
Continued…
Coordinate Transformation
Reference coordinate frame OXYZ
Body-attached frame O’uvw z
Pxyz [ p x , p y , p z ] T
y
w
Pxyz p x i x p y jy p z k z v
Point represented in O’uvw: x
O, O’
u
Puvw pu i u pv jv pw k w
Two frames coincide ==> pu p x pv p y pw p z
26
Properties: Dot Product
Let x and y be arbitrary vectors in R3 and be the
angle from x to y , then
x y x y cos
Pxyz RPuvw u
x
28
Basic Rotation
Basic Rotation
p x, p y, and pz represent the projections of P onto
OX, OY, OZ axes, respectively
Since
P pu i u pv jv pw k w
px 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
pz k z P k z i u pu k z jv pv k z k w pw
29
Rotation Matrix
px i x i u i x jv i x k w pu
p j i jy jv
jy k w pv
y y u
p z k z i u k z jv k z k w pw
z
Rotation about x-axis with w
P v
1 0 0
Rot ( x, ) 0 C
S
y
0 S C u
x
30
Rotation about x
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
31
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
pu i u i x i u jy i u k z px Puvw QPxyz
p j i jv j y
jv k z p y
v v x
pw k w i x k w jy k w k z p z 1
QR R T
33
Denavit-Hartenberg
Representation
34
Inverse Homogeneous Matrix?
The homogeneous transformation matrix is represented as:
R33 P31 Position of the origin of OUVW
T coordinate frame w.r.t. OXYZ frame
1 R T
R T P R P R T R 0
T T I 44
0 1 0 1 0 1
35
Forward and Inverse Kinematics
Equations for Orientation
Once the position of the robot is determined, the next step will be
the frame appropriately in order to achieve a desired orientation
without changing its position.
36
Roll, Pitch, Yaw(RPY) Angles
The movements relating to RPY rotations are relative to the
current moving axes.
Roll: Rotation of a about a -axis (z-axis of the moving frame)
Pitch: Rotation of o about o -axis (y-axis of the moving frame)
Yaw: Rotation of n about n -axis (x-axis of the moving frame)
37
Orientation Representation
Description of Roll Pitch Yaw
Z
Y
X
38
Rotation Matrix of YPR
How to get the resultant rotation matrix for YPR?
T Rz , R y , Rx ,
C S 0 0 C 0 S 0 1 0 0 0
S C 0 0 0 1 0 0 0 C S 0
0 0 1 0 S 0 C 0 0 S C 0
0 0 0 1 0 0 0 1 0 0 0 1
Z
Y
X 39
Euler Angles
• Rotation of abouta -axis (z-axis of the moving frame)
followed by
• Rotation of about o -axis (y-axis of the moving frame)
followed by
• Rotation of about a -axis (z-axis of the moving frame).
40
Euler Angle
w'= z
w'"= w"
v'"
v"
v'
y
u'"
u' =u"
x
41
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
43
Euler Angle
Resultant Eulerian rotation matrix:
Denavit-Hartenberg Representation
45
Denavit-hartenberg Representation of
Forward Kinematic Equations of
Robot
Denavit-Hartenberg Representation :
@ Simple way of modeling robot links and
joints for any robot configuration,
regardless of its sequence or complexity.
@ Transformations in any coordinates
is possible.
@ Any possible combinations of joints
and links and all-revolute articulated
robots can be represented.
46
Denavit-hartenberg Representation
Procedures
Start point:
Assign joint number n to the first
z
shown joint. y
z
Assign a local reference frame y x
z z
for each and every joint before or x y
after these joints. y x
Y-axis does not used in D-H
representation. x
47
Denavit Hartenberg Representation
48
Procedures For Assigning A Local
Reference Frame To Each Joint
٭All joints are represented by a z-axis. (right-hand rule for
rotational joint, linear movement for prismatic joint)
٭The common normal is one line mutually perpendicular to any
two skew lines.
٭Parallel z-axes joints make a infinite number of common
normal.
٭Intersecting z-axes of two successive joints make no common
normal between them(Length is 0.).
49
Symbol Terminologies
50
Link and Joint Parameters
Joint angle i : the angle of rotation from the Xi-1 axis to the Xi
axis about the Zi-1 axis. It is the joint variable if joint i is
rotary.
Link length a i : the distance from the intersection of the Zi-1 axis
and the Xi axis to the origin of the ith coordinate system along
the Xi axis.
Link twist angle i: the angle of rotation from the Zi-1 axis to the
Zi axis about the Xi axis.
51
52
Transformation between i-1 and I
Procedure
Four successive elementary transformations are required to relate
the i-th coordinate frame to the (i-1)-th coordinate frame:
• Rotate about the Z i-1 axis an angle of i to align the X i-1
axis with the X i axis.
• Translate along the Z i-1 axis a distance of di, to bring Xi-1
and Xi axes into coincidence.
• Translate along the Xi axis a distance of ai to bring the two
53
Transformation between i-1 and i
D-H transformation matrix for adjacent coordinate
frames, i and i-1.
The position and orientation of the i-th frame coordinate can be
expressed in the (i-1)th frame by the following homogeneous
transformation matrix:
Source coordinate
Ti i 1 T ( zi 1 , d i ) R( zi 1 , i )T ( xi , ai ) R( xi , i )
C i C i S i S i S i ai C i
Reference S C i C i S i C i ai S i
Coordinate i
0 S i C i di
0 0 0 1
54
The Fundamental Problem With
D-h Representation
Defect of D-H presentation : D-H cannot represent any
motion about the y-axis, because all motions are about the x-
and z-axis. The Parameters Table For The
Stanford Arm
# d a
1 1 0 0 -90
2 2 d1 0 90
3 0 d1 0 0
4 4 0 0 -90
5 5 0 0 90
6 6 0 0 0
55
Link Frame Assignments
56
Solution
c1 s1 0 a0 c1 s1 0 0
s c c1c 0 s 0 s 0 d1 s1 c1 0 0
0
T 1 0
1
s1s 0 c1s 0 c 0 c 0 d1 0 0 1 0
0 0 0 1 0 0 0 1
c 2 s 2 0 L1 c3 s3 0 L2
s c 2 0 0 s c3 0 0
1
T 2
3T
2 3
2
0 0 1 0 0 0 1 0
0 0 0 1 0 0 0 1
c123 s123 0.0 l1c1 l2 c12
s c 0.0 l s l s
B
T 0
T 123 123 1 1 2 12
.
W 3
0.0 0.0 1.0 0.0
0 0 0 1 57
The Inverse Kinematic Solution of
Robot
Determine the value of each joint to place the arm at a
desired position and orientation.
R
TH A1 A2 A3 A4 A5 A6
nz oz az pz
0 0 0 1 58
Continued…
nx ox axpx
p y
1 n y oy ay
A1 A11[ RHS ] A2 A3 A4 A5 A6
nz oz azpz
0 0 0 1
C1 S1 0 0 nx ox a x p x
0 0 1 0 n y o y a y p y
A2 A3 A4 A5 A6
S1 C1 0 0 nz oz a z p z
0 0 0 1 0 0 0 1
S3 4 234 2 3
3 tan 1
C3
59
Kinematic Equations
Forward Kinematics q (q1 , q2 , qn )
Given joint variables
End-effector position & orientation Y ( x, y, z, , , )
Homogeneous matrix T0n
specifies the location of the ith coordinate frame w.r.t. the
base coordinate system
chain product of successive coordinate transformation
matrices of Ti i 1
Position
T T T T
0
n 1 2
0 1
n
n 1 vector
Treftool Bref
0
T0n H ntool
Yaw-Pitch-Roll representation for orientation
T Rz , R y , Rx ,
C S 0 0 C 0 S 0 1 0 0 0
S C 0 0 0 1 0 0 0 C S 0
0 0 1 0 S 0 C 0 0 S C 0
0 0 0 1 0 0 0 1 0 0 0 1
61
Representing Forward Kinematics
Yaw-Pitch-Roll representation for orientation
C S 0 0 C 0 S 0 1 0 0 0
S C 0 0 0 1 0 0 0 C S 0
0 0 1 0 S 0 C 0 0 S C 0
0 0 0 1 0 0 0 1 0 0 0 1
nx sx ax 0
n sy ay 0
y
nz sz az 0
0 0 0 1
63
Yaw-Pitch-Roll Representation
1
Rz , T R y , Rx ,
C S 0 0 nx sx ax 0
S 0 n
C 0
y sy ay 0
0 0 1 0 nz sz az 0
0 0 0 1 0 0 0 1
(Equation A)
C 0 S 0 1 0 0 0
0 0 C 0
1 0 0 S
S 0 C 0 0 S C 0
0 0 0 1 0 0 0 1
64
Yaw-Pitch-Roll Representation
Compare LHS and RHS of Equation A, we have:
66
Assignment 1
67
Assignment 2
68
Composite transformation
The total transformation will be, product of the
transformation matrices
i 1
Ti Tz i Tz di Tx a i Tz i
69
Complete transformation matrix of a
Robot
The complete transformation matrix of a robot
gives, the location and orientation of the end
effector with respect to the base.
It is found by multiplication of transformation
matrix of adjacent frames.
0
Tn 0 T1 1 T2 2 T3 ...n 1 Tn
x L1 cos(1 ) L 2 cos(1 2 )
y L1 sin( 1 ) L 2 sin( 1 2 )
71
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.
72
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
73
Composite Rotation Matrix
A sequence of finite rotations
matrix multiplications do not commute rules:
• if rotating coordinate O-U-V-W is rotating about
75
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}
1. Translation only
Axes of {B} and {A} are
parallel A
RB 1
2. Rotation only
Origins of {B} and {A}
are coincident
r 0
A o'
77
Homogeneous Representation
• Coordinate transformation from {B} to {A}
r ARB B r P Ar o'
A P
A r P A RB
A o'
r r
B P
1 013 1 1
• Homogeneous transformation matrix
RB
A
r R33
A o'
P31 Rotation
matrix
TB
A
Position
013 1 0 1 vector
Scaling
78
Homogeneous Transformation
Special cases
1. Translation
I 33 r
A o'
A
TB
013 1
2. Rotation
A
RB 031
A
TB
013 1
79
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
80
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 p w
0 0 0 1 1 0 0 0 1 1
z
w
P v
y
u
x
81
Transformation Rule
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
82
Example
Find the homogeneous transformation matrix (T) for the
following operations:
Rotation about OX axis
Translation of a along OX axis
T Rx , I 44
Translation of d along OZ axis
Rotation of about OZ axis
T Tz , Tz ,d Tx ,aTx , I 44
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
83
Homogeneous Representation
A frame in space (Geometric
Interpretation) P( px , p y , pz )
z
R33 P31 a (z’)
F
s(y’)
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
84
Homogeneous Transformation
Translation
a
1 0 0 d x nx s x ax px s
0 1 0 d y n y s y ay p y
Fnew z a n
0 0 1 d z nz s z az pz s
0 0 0 1 0 0 0 1
sx ax px d x
n
nx
n s y a y p y d y
y
y
nz sz az pz d z
0 0 0 1
y1 x2
z0 0
A1 1
A2
y0
x1
x0
?
i 1 Transformation matrix for
Ai adjacent coordinate frames
0
A2 0A11 A2 Chain product of successive coordinate
transformation matrices
86
Forward kinematics: Find coordinate of yellow dot with
respect to base frame
Y3
Y4
3
Y2 2 X3 3
2 X2
X4
Inverse kinematics is given (x4, y4), find the angles y3,y2 and y1
87
Articulated Robot
Using DH algorithm
Link a d q C S
1 0 90 0 1 1 0 1
2 L2 0 0 2 2 1 0
3 L3 0 0 3 3 1 0
C1 0 S1 0 C1
C 2 S2 0 L 2C 2
S 0 C1 0 S C2 0 L 2S2
0
T1 1 1
T2 2
0 1 0 0 0 0 1 0
0 0 0 1 0 0 0 1
C 3 S3 0 L 3C 3 C1C 23 C1S23 S1 C1 L 3C 23 L 2 C 2
S 0 L 3S3 0 S C
C3 S1S23 C1 S1 L 3C 23 L 2 C 2
2
T3 3 T3 1 23
0 0 1 0 S23 C 23 0 L3S23 L 2S2
0 0 0 1 0 0 0 1
88
Articulated Manipulator
Let the end effector position and orientation be
0.35 0.866 0.35 0.11
0.6 0.5 0.6 0.18
T
0.7 0 0.7 0.21
0 0 0 1
T1 T2 T T3
0 1
2 1
90
Articulated joint Cont’d
Squaring the first two equations and adding them and
using the trigonometric identity
S2 L3r31 r34
C2 L3r11 r14 2 L3r21 r24 2
91
Articulated joint Cont’d
S23 r31
This gives and hence
C 23 r32
2+3= atan(r31,r32)
92