the city college of new york 1 kinematics of robot manipulator introduction to robotics
TRANSCRIPT
The City College of New York
2
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
3
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 objects3) Re-programmable: can do different things4) Function autonomously and/or interact with human beings
• Why use robots?
4A: Automation, Augmentation, Assistance, Autonomous
4D: Dangerous, Dirty, Dull, Difficult
–Perform 4A tasks in 4D environments
The City College of New York
4
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
Robotic Manipulators
5
• 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
The City College of New York
Joints
7
• 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
The City College of New York
Joint Variables
8
• 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
The City College of New York
Revolute Joint Variable
9
• revolute– qi = i : angle of rotation of link i relative to link
i – 1
link i – 1
link i
i
The City College of New York
Prismatic Joint Variable
10
• prismatic– qi = di : displacement of link i relative to link i –
1 link i – 1 link i
di
The City College of New York
Common Manipulator Arrangments
11
• 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
The City College of New York
Articulated Manipulator
12
• RRR (first three joints are all revolute)• joint axes
– z0 : waist
– z1 : shoulder (perpendicular to z0)
– z2 : elbow (parallel to z1)
z0z1 z2
waist
shoulder
elbow
forearm
1
2 3
The City College of New York
Spherical Manipulator
13
• RRP
• Stanford arm – http://infolab.stanford.edu/pub/voy/museum/pictures/display/robots/IMG_2404ArmFrontPeek
ingOut.JPG
z0z1
z2
waist
shoulder
1
2
d3
The City College of New York
SCARA Manipulator
14
• RRP
• Selective Compliant Articulated Robot for Assembly
– http://www.robots.epson.com/products/g-series.htm
z0
z1 z2
1
2
d3
The City College of New York
15
Manipulators• Robot Configuration:
Cartesian: PPP Cylindrical: RPP Spherical: RRP
SCARA: RRP
(Selective Compliance Assembly Robot Arm)
Articulated: RRR
Hand coordinate:
n: normal vector; s: sliding vector;
a: approach vector, normal to the
tool mounting plate
The City College of New York
16
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
17
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– Payload (load capacity)– Precision v.s. Repeatability
Which one is more important?
how accurately a specified point can be reached
how accurately the same position can be reached if the motion is repeated many times
The City College of New York
18
What is Kinematics
• Forward kinematics
Given joint variables
End-effector position and orientation, -Formula?
),,,,,,( 654321 nqqqqqqqq
),,,,,( TAOzyxY x
y
z
The City College of New York
19
What is Kinematics• Inverse kinematics
End effector position
and orientation
Joint variables -Formula?
),,,,,,( 654321 nqqqqqqqq
),,,,,( TAOzyx
x
y
z
The City College of New York
20
Example 1
0x
0y
1x1y
)/(cos
kinematics Inverse
sin
cos
kinematics Forward
11
1
1
lx
ly
lx
l
The City College of New York
Example II
21
• given the joint variables and dimensions of the links what is the position and orientation of the end effector?
2
1
a1
a2
The City College of New York
Forward Kinematics
22
• choose the base coordinate frame of the robot– we want (x, y) to be expressed in this frame
2
1
a1
a2
(x, y) ?
x0
y0
The City College of New York
Forward Kinematics
23
• notice that link 1 moves in a circle centered on the base frame origin
2
1
a1
a2
(x, y) ?
x0
y0
( a1 cos 1 , a1 sin 1 )
The City College of New York
Forward Kinematics
24
• choose a coordinate frame with origin located on joint 2 with the same orientation as the base frame
2
1
a1
a2
(x, y) ?
x0
y0
( a1 cos 1 , a1 sin 1 )
1
x1
y1
The City College of New York
Forward Kinematics
25
• notice that link 2 moves in a circle centered on frame 1
2
1
a1
a2
(x, y) ?
x0
y0
( a1 cos 1 , a1 sin 1 )
1
x1
y1
( a2 cos (1 + 2), a2 sin (1 + 2) )
The City College of New York
Forward Kinematics
26
• 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
2
1
a1
a2
x0
y0
( a1 cos 1 , a1 sin 1 )
1
x1
y1
( a2 cos (1 + 2), a2 sin (1 + 2) )
(a1 cos 1 + a2 cos (1 + 2), a1 sin 1 + a2 sin (1 + 2) )
The City College of New York
Forward Kinematics
27
• we also want the orientation of frame 2 with respect to the base frame
– x2 and y2 expressed in termsof x0 and y0
2
1
a1
a2
x0
y0
1
x2y2
The City College of New York
Forward Kinematics
28
2
1
a1
a2
x0
y0
1
x2 = (cos (1 + 2), sin (1 + 2) )
y2 = (-sin (1 + 2), cos (1 + 2) )
x2y2
The City College of New York
Inverse Kinematics
29
• given the position (and possiblythe orientation) of the endeffector, and the dimensionsof the links, what are the jointvariables?
2 ?
1 ?
a1
a2
x0
y0
x2y2
(x, y)
The City College of New York
Inverse Kinematics
30
• harder than forward kinematics because there is often more than one possible solution
a1
a2
x0
y0
(x, y)
The City College of New York
Inverse Kinematics
31
law of cosines
2 ?
a1
a2
x0
y0
(x, y)
22221
22
21
2 )cos(2 yxaaaab
b
The City College of New York
Inverse Kinematics
32
21
22
21
22
2 2)cos(
aa
aayx
)cos()cos( 22
and we have the trigonometric identity
221
22
21
22
2 2cos C
aa
aayx
therefore,
We could take the inverse cosine, but this gives only one of the two solutions.
The City College of New York
Inverse Kinematics
33
1cossin 222
to obtain
Instead, use the two trigonometric identities:
cos
sintan
2
221
2
1tan
C
C
which yields both solutions for 2 . In many programming languages you would use thefour 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);
The City College of New York
35
Preliminary
• Robot Reference Frames– World frame– Joint frame– Tool frame
x
yz
x
z
y
W R
PT
The City College of New York
Points and Vectors
36
• point : a location in space
• vector : magnitude (length) and direction between two points
p
qv
The City College of New York
Coordinate Frames
37
• choosing a frame (a point and two perpendicular vectors of unit length) allows us to assign coordinates
0p
0q
1
2000 qpv0x
0y
0o 0
5.1
20q
5.2
40p
The City College of New York
Coordinate Frames
38
• the coordinates change depending on the choice of frame
1p
1q
2
1111 qpv
1x
1y1o 1
2
5.01q
4
5.01p
The City College of New York
39
Preliminary• Coordinate Transformation
– Reference coordinate frame OXYZ
– Body-attached frame O’uvw
wvu kji wvuuvw pppP
zyx kji zyxxyz pppP
x
y
z
P
u
vw
O, O’
Point represented in OXYZ:
zwyvxu pppppp
Tzyxxyz pppP ],,[
Point represented in O’uvw:
Two frames coincide ==>
The City College of New York
40
Preliminary
• Mutually perpendicular • Unit vectors
Properties of orthonormal coordinate frame
0
0
0
jk
ki
ji
1||
1||
1||
k
j
i
Properties: Dot Product
Let and be arbitrary vectors in and be the angle from to , then
3R
cosyxyx
x yx y
The City College of New York
41
Preliminary
• Coordinate Transformation– Rotation only
wvu kji wvuuvw pppP
x
y
zP
zyx kji zyxxyz pppP
uvwxyz RPP u
vw
How to relate the coordinate in these two frames?
The City College of New York
42
Preliminary• Basic Rotation
– , , and represent the projections of onto OX, OY, OZ axes, respectively
– Since
xp Pyp zp
wvux pppPp wxvxuxx kijiiii
wvuy pppPp wyvyuyy kjjjijj
wvuz pppPp wzvzuzz kkjkikk
wvu kji wvu pppP
The City College of New York
43
Preliminary• Basic Rotation Matrix
– Rotation about x-axis with
w
v
u
z
y
x
p
p
p
p
p
p
wzvzuz
wyvyuy
wxvxux
kkjkik
kjjjij
kijiii
x
z
y
v
wP
u
CS
SCxRot
0
0
001
),(
The City College of New York
44
Preliminary• Is it True?
– Rotation about x axis with
cossin
sincos
cossin0
sincos0
001
wvz
wvy
ux
w
v
u
z
y
x
ppp
ppp
pp
p
p
p
p
p
p
x
z
y
v
wP
u
The City College of New York
45
Basic Rotation Matrices– Rotation about x-axis with
– Rotation about y-axis with
– Rotation about z-axis with
uvwxyz RPP
CS
SCxRot
0
0
001
),(
0
010
0
),(
CS
SC
yRot
100
0
0
),(
CS
SC
zRot
The City College of New York
46
Preliminary• Basic Rotation Matrix
– Obtain the coordinate of from the coordinate of
uvwxyz RPP
wzvzuz
wyvyuy
wxvxux
kkjkik
kjjjij
kijiii
R
xyzuvw QPP
TRRQ 1
31 IRRRRQR T
uvwP
xyzP
<== 3X3 identity matrix
z
y
x
w
v
u
p
p
p
p
p
p
zwywxw
zvyvxv
zuyuxu
kkjkik
kjjjij
kijiii
Dot products are commutative!
The City College of New York
Properties of Rotation Matrices
04/20/2347
• 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)
The City College of New York
48
Example
• A point 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.
)2,3,4(uvwa
2
964.4
598.0
2
3
4
100
05.0866.0
0866.05.0
)60,( uvwxyz azRota
The City College of New York
49
Example• A point is the coordinate w.r.t. the
reference coordinate system, find the corresponding point w.r.t. the rotated OU-V-W coordinate system if it has been rotated 60 degree about OZ axis.
)2,3,4(xyza
uvwa
2
964.1
598.4
2
3
4
100
05.0866.0
0866.05.0
)60,( xyzT
uvw azRota
The City College of New York
50
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
51
Example• Find the rotation matrix for the following
operations:
Post-multiply if rotate about the OUVW axes
Pre-multiply if rotate about the OXYZ axes
...
axis OUabout Rotation
axisOW about Rotation
axis OYabout Rotation
Answer
SSSCCSCCSSCS
SCCCS
CSSSCCSCSSCC
CS
SCCS
SC
uRotwRotIyRotR
0
0
001
100
0
0
C0S-
010
S0C
),(),(),( 3
The City College of New York
Translation
52
• suppose we are given o1 expressed in {0}
1x
1y
1o
10x
0y
0o
0
0
301o
The City College of New York
Translation 1
53
• the location of {1} expressed in {0}
1x
1y
1o
10x
0y
0o
0
0
3
0
0
0
300
01
01 ood
The City College of New York
Translation 1
54
1. the translation vector can be interpreted as the location of frame {j} expressed in frame {i}
ijd
The City College of New York
Translation 2
55
• p1 expressed in {0}
1x
1y
1o
10x
0y
0o
0
1
4
1
1
0
3101
0 pdp
1
11p
a point expressedin frame {1}
The City College of New York
Translation 2
56
2. the translation vector can be interpreted as a coordinate transformation of a point from frame {j} to frame {i}
ijd
The City College of New York
Translation 3
57
• q0 expressed in {0}
0x
0y
0o
0
1
2
1
1
0
300 pdq
1
10p
1
20q
The City College of New York
Translation 3
58
3. the translation vector can be interpreted as an operator that takes a point and moves it to a new point in the same frame
d
The City College of New York
59
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
60
Coordinate Transformations• Two Special Cases
1. Translation only– Axes of {B} and {A} are
parallel
2. Rotation only– Origins of {B} and {A}
are coincident
1BAR
ABB
AA'oPP rrRr
0r A'o
The City College of New York
61
Homogeneous Representation• Coordinate transformation from {B} to {A}
• Homogeneous transformation matrix
ABB
AA'oPP rrRr
1
r
10
rR
1
r BP
31
A'oB
AAP
10
PR
10
rRT 1333
31
A'oB
A
BA
Position vector
Rotation matrix
Scaling
The City College of New York
62
Homogeneous Transformation• Special cases
1. Translation
2. Rotation
10
0
31
13BA
BA RT
10
rIT
31
A33
BA 'o
The City College of New York
63
Example • Translation along Z-axis with h:
1000
100
0010
0001
),(h
hzTrans
111000
100
0010
0001
1
hp
p
p
p
p
p
hz
y
x
w
v
u
w
v
u
x
y
z P
u
vw
O, O’hx
y
z
P
u
vw
O, O’
The City College of New York
64
Example • Rotation about the X-axis by
1000
00
00
0001
),(
CS
SCxRot
x
z
y
v
wP
u
11000
00
00
0001
1w
v
u
p
p
p
CS
SC
z
y
x
The City College of New York
65
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
66
Example• Find the homogeneous transformation matrix
(T) for the following operations:
:
axis OZabout ofRotation
axis OZ along d ofn Translatio
axis OX along a ofn Translatio
axis OXabout Rotation
Answer
44,,,, ITTTTT xaxdzz
1000
00
00
0001
1000
0100
0010
001
1000
100
0010
0001
1000
0100
00
00
CS
SC
a
d
CS
SC
The City College of New York
67
Homogeneous Representation• A frame in space (Geometric
Interpretation)
x
y
z),,( zyx pppP
1000zzzz
yyyy
xxxx
pasn
pasn
pasn
F
n
sa
101333 PR
F
Principal axis n w.r.t. the reference coordinate system
(X’)
(y’)(z’)
The City College of New York
68
Homogeneous Transformation
• Translation
y
z
n
sa n
sa
1000
10001000
100
010
001
zzzzz
yyyyy
xxxxx
zzzz
yyyy
xxxx
z
y
x
new
dpasn
dpasn
dpasn
pasn
pasn
pasn
d
d
d
F
oldzyxnew FdddTransF ),,(
The City College of New York
69
Homogeneous Transformation
21
10
20 AAA
Composite Homogeneous Transformation Matrix
0x
0z
0y
10 A
21A
1x
1z
1y 2x
2z2y
?i
i A1 Transformation matrix for adjacent coordinate frames
Chain product of successive coordinate transformation matrices
The City College of New York
70
Example• For the figure shown below, find the 4x4 homogeneous transformation
matrices and for i=1, 2, 3, 4, 5
1000zzzz
yyyy
xxxx
pasn
pasn
pasn
F
ii A1
iA0
0x 0y
0z
a
b
c
d
e
1x
1y
1z
2z2x
2y
3y3x
3z
4z
4y4x
5x5y
5z
1000
010
100
0001
10
da
ceA
1000
0100
001
010
20 ce
b
A
1000
0001
100
010
21 da
b
A
Can you find the answer by observation based on the geometric interpretation of homogeneous transformation matrix?
The City College of New York
71
Orientation Representation
• Rotation matrix representation needs 9 elements to completely describe the orientation of a rotating rigid body.
• Any easy way?
101333 PR
F
Euler Angles Representation
The City College of New York
72
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
74
Orientation Representation• Euler Angle I
100
0cossin
0sincos
,
cossin0
sincos0
001
,
100
0cossin
0sincos
''
'
w
uz
R
RR
The City College of New York
75
Euler Angle I
cossincossinsin
sincos
coscoscos
sinsin
cossincos
cossin
sinsincoscossin
sincos
cossinsin
coscos
''' wuz RRRR
Resultant eulerian rotation matrix:
The City College of New York
76
Euler Angle II, Animated
x
y
z
u'
v'
=v"
w"
w'=
u"
v"'
u"'
w"'=
Note the opposite (clockwise) sense of the third rotation, .
The City College of New York
77
Orientation Representation
• Matrix with Euler Angle II
cossinsinsincos
sinsin
coscossin
coscos
coscossin
sincos
sincoscoscossin
cossin
coscoscos
sinsin
Quiz: How to get this matrix ?
The City College of New York
78
Orientation Representation• Description of Roll Pitch Yaw
X
Y
Z
Quiz: How to get rotation matrix ?
The City College of New York
Inverse Transformation
79
• the inverse of a transformation undoes the original transformation– if
– then
1000
dRT
10001 dRR
TTT