Introduction to Robotics (Fag 3480) · Fag 3480 - Introduction to Robotics. side 30. Rotation...
Transcript of Introduction to Robotics (Fag 3480) · Fag 3480 - Introduction to Robotics. side 30. Rotation...
Introduction to Robotics (Fag 3480)Vår 2010
Robert Wood (Harward Engineeering and Applied Sciences-Basis)Ole Jakob Elle, PhD (Modified for IFI/UIO)
Førsteamanuensis II, Institutt for InformatikkUniversitetet i Oslo
Seksjonsleder Teknologi, Intervensjonssenteret, Oslo Universitetssykehus (Rikshospitalet)
Fag 3480 - Introduction to Roboticsside 2
Ch. 2: Rigid Body Motions and Homogeneous Transforms
Fag 3480 - Introduction to Roboticsside 3
Industrial robotsHigh precision and repetitive tasks
Pick and place, painting, etc
Hazardous environments
Fag 3480 - Introduction to Roboticsside 4
RepresentationsFor the majority of this class, we will consider robotic manipulators as open or closed chains of links and joints
Two types of joints: revolute (θ) and prismatic (d)
Fag 3480 - Introduction to Roboticsside 5
Arm configurationsThe most frequent arm configurations are :•Open kinematic chains :
•Jointed articulated or anthropomorphic (human-like arms) (RRR)•Spherical (RRP)•Scara (RRP)•Cylindrical (RPP)•Cartesian (PPP)•Multi-joined (RRRRRR.....) , Redundant configurations
•Closed kinematic chains
Fag 3480 - Introduction to Roboticsside 6
DefinitionsEnd-effector/Tool
Device that is in direct contact with the environment. Usually very task-specific
Configuration
Complete specification of every point on a manipulator
set of all possible configurations is the configuration space
For rigid links, it is sufficient to specify the configuration space by the joint angles,
State space
Current configuration (joint positions q) and velocities
Work space
The reachable space the tool can achieve
Reachable workspace
Dextrous workspace
[ ]Tnqqqq ...21=
q
Fag 3480 - Introduction to Roboticsside 7
Common configurations: wristsMany manipulators will be a sequential chain of links and joints forming the ‘arm’ with multiple DOFs concentrated at the ‘wrist’
Fag 3480 - Introduction to Roboticsside 8
Common configurations: elbow manipulatorAnthropomorphic arm: ABB IRB1400 or KUKA
Very similar to the lab arm NACHI (RRR)
Fag 3480 - Introduction to Roboticsside 9
Antropomorphic arm (RRR)
Fag 3480 - Introduction to Roboticsside 10
Common configurations: SCARA (RRP)
Fag 3480 - Introduction to Roboticsside 11
Spherical Manipulator (RRP)
Fag 3480 - Introduction to Roboticsside 12
Common configurations: cylindrical robot (RPP)
workspace forms a cylinder
Seiko RT3300 Robot
Fag 3480 - Introduction to Roboticsside 13
Common configurations: Cartesian robot (PPP)
Increased structural rigidity, higher precision
Pick and place operations
Epson Chartesian robot (EZ-modules)
Fag 3480 - Introduction to Roboticsside 14
Workspace comparison(a) spherical
(b) SCARA
(c) cylindrical
(d) Cartesian
Fag 3480 - Introduction to Roboticsside 15
Parallel manipulators
6DOF Stewart platform
some of the links will form a closed chain with ground
Advantages:
Motors can be proximal: less powerful, higher bandwidth, easier to control
Disadvantages:
Generally less motion, kinematics can be challenging
ABB IRB940 Tricept
Fag 3480 - Introduction to Roboticsside 16
CASPAR - Maquet
ROBODOC –Integrated Surgical Systems Inc.
PathFinder –Armstrong HealthCare Lmt.
Image-guided robots
Fag 3480 - Introduction to Roboticsside 17
Simple example: control of a 2DOF planar manipulator
Move from ‘home’ position and follow the path AB with a constant contact force F all using visual feedback
Fag 3480 - Introduction to Roboticsside 18
Coordinate frames & forward kinematicsThree coordinate frames:
Positions:
Orientation of the tool frame:0 1
2
( )( )
=
11
11
1
1
sincos
θθ
aa
yx
( ) ( )( ) ( ) ty
xaaaa
yx
≡
++++
=
21211
21211
2
2
sinsincoscos
θθθθθθ
0 1 2
+++−+
=
⋅⋅⋅⋅
=)cos()sin()sin()cos(
ˆˆˆˆˆˆˆˆ
2121
2121
0202
020202 θθθθ
θθθθyyyxxyxx
R
=
=
10ˆ
01ˆ 00 yx ,
++−
=
++
=)cos()sin(ˆ
)sin()cos(ˆ
21
212
21
212 θθ
θθθθθθ
yx ,
Fag 3480 - Introduction to Roboticsside 19
Ch. 2: Rigid Body Motions and Homogeneous Transforms
Fag 3480 - Introduction to Roboticsside 20
Definition: coordinate frame
A set n of orthonormal basis vectors spanning Rn
For example,
When representing a point p, we need to specify a coordinate frame
With respect to o0:
With respect to o1:
v1 and v2 are invariant geometric entities
But the representation is dependant
upon choice of coordinate frame
Representing position
=
650p
−=
2.48.21p
=
=
=
100
ˆ
010
ˆ
001
ˆ kji , ,
−=
−=
=
=
2.48.2
11.5
8.077.7
65 1
202
11
01 vvvv , , ,
Fag 3480 - Introduction to Roboticsside 21
2D rotations
Representing one coordinate frame in terms of another
Where the unit vectors are defined as:
This is a rotation matrix
Rotations
[ ]01
01
01 yxR =
−=
=
θθ
θθ
cossinˆ
sincosˆ 0
010
01 yyxx ,
−=
θθθθ
cossinsincos0
1R
Fag 3480 - Introduction to Roboticsside 22
Rotation matrices as projections
Projecting the axes of from o1 onto the axes of frame o0
Alternate approach
⋅⋅
=
⋅⋅
=01
0101
01
0101 ˆˆ
ˆˆˆˆˆˆ
yyxy
yyxxx
x ,
−=
−
+
=
⋅⋅⋅⋅
=
θθθθ
θθπ
πθθ
cossinsincos
cosˆˆ2
cosˆˆ
2cosˆˆcosˆˆ
ˆˆˆˆˆˆˆˆ
0101
0101
0101
010101
yyyx
xyxx
yyyxxyxx
R
Fag 3480 - Introduction to Roboticsside 23
Properties of rotation matricesInverse rotations:
Or, another interpretation uses odd/even properties:
( )TR
yyyx
xyxx
yyyxxyxx
R
01
1010
1010
1010
101010
cossinsincos
cosˆˆ2
cosˆˆ
2cosˆˆcosˆˆ
ˆˆˆˆˆˆˆˆ
=
−
=
+
−
=
⋅⋅⋅⋅
=
θθθθ
θπθ
θπθ
( ) ( )( ) ( )
( )TR
R
01
10
cossinsincos
cossinsincos
=
−
=
−−−−−
=
θθθθ
θθθθ
Fag 3480 - Introduction to Roboticsside 24
Properties of rotation matricesInverse of a rotation matrix:
The determinant of a rotation matrix is always ±1
+1 if we only use right-handed convention
( )
( ) ( )TRR
yyyx
xyxx
yyyxxyxx
R
010
1
1
1
0101
0101
1
0101
0101101
cossinsincos
det1
cossinsincos
cosˆˆ2
cosˆˆ
2cosˆˆcosˆˆ
ˆˆˆˆˆˆˆˆ
=
−
=
−=
−
−
=
⋅⋅⋅⋅
=
−
−
−−
θθθθ
θθθθ
θθπ
πθθ
Fag 3480 - Introduction to Roboticsside 25
Properties of rotation matricesSummary:
Columns (rows) of R are mutually orthogonal
Each column (row) of R is a unit vector
The set of all n x n matrices that have these properties are called the Special Orthogonal group of order n
( ) 1det
1
== −
RRRT
( )nSOR ∈
Fag 3480 - Introduction to Roboticsside 26
3D rotations
( )3ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
010101
010101
01010101 SO
zzzyzxyzyyyxxzxyxx
R ∈
⋅⋅⋅⋅⋅⋅⋅⋅⋅
=
General 3D rotation:
Special cases
Basic rotation matrices
−=
−=
θθ
θθ
θθθθ
θ
θ
cos0sin010
sin0cos
cossin0sincos0001
,
,
y
x
R
R
−=
1000cossin0sincos
, θθθθ
θzR
Fag 3480 - Introduction to Roboticsside 27
Properties of rotation matrices (cont’d)
SO(3) is a group under multiplication
Closure:
Identity:
Inverse:
Associativity:
In general, members of SO(3) do not commute
( ) ( )33 2121 SORRSORR ∈⇒∈ , if
( )3100010001
SOI ∈
=
1−= RRT
( ) ( )321321 RRRRRR = Allows us to combine rotations:bcabac RRR =
1221 RRRR ≠
Fag 3480 - Introduction to Roboticsside 28
Now assume p is a fixed point on the rigid object with fixed coordinate frame o1
The point p can be represented in the
frame o0 (p0) again by the projection onto
the base frame
Rotational transformations
=
wvu
p1
( )( )( )
101
010101
010101
010101
010101
010101
010101
0111
0111
0111
01
01
01
0
ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
ˆˆˆˆˆˆˆˆˆˆˆˆ
ˆˆˆ
pRwvu
zzzyzxyzyyyxxzxyxx
zzwzyvzxuyzwyyvyxuxzwxyvxxu
zzwyvxuyzwyvxuxzwyvxu
zpypxp
p
=
⋅⋅⋅⋅⋅⋅⋅⋅⋅
=
⋅+⋅+⋅⋅+⋅+⋅⋅+⋅+⋅
=
⋅++⋅++⋅++
=
⋅⋅⋅
=
Fag 3480 - Introduction to Roboticsside 29
Rotating a vectorAnother interpretation of a rotation matrix:
Rotating a vector about an axis in a fixed frame
Ex: rotate v0 about y0 by π/2
=
110
0v
=
−=
−=
=
=
011
110
001010100
110
cos0sin010
sin0cos
2/
02/,
1
πθ
π
θθ
θθ
vRv y
Fag 3480 - Introduction to Roboticsside 30
Rotation matrix summaryThree interpretations for the role of rotation matrix:
Representing the coordinates of a point in two different frames
Orientation of a transformed coordinate frame with respect to a fixed frame
Rotating vectors in the same coordinate frame
Fag 3480 - Introduction to Roboticsside 31
Similarity transformsAll coordinate frames are defined by a set of basis vectors
These span Rn
Ex: the unit vectors i, j, k
In linear algebra, a n x n matrix A is a mapping from Rn to Rn
y = Ax, where y is the image of x under the transformation A
Think of x as a linear combination of unit vectors (basis vectors), for example the unit vectors:
Then the columns of A are the images of these basis vectors
If we want to represent vectors with respect to a different basis, e.g.: f1, …, fn, the transformation A can be represented by:
Where the columns of T are the vectors f1, …, fn,
[ ] [ ]TnT ee 1...000...011 == ..., ,
ATTA 1−=′
Fag 3480 - Introduction to Roboticsside 32
Similarity transformsA’ and A have the same eigenvalues
An eigenvector x of A corresponds to an eigenvector T-1x of A’
Rotation matrices are also a change of basis
If A is a linear transformation in o0 and B is a linear transformation in o1, then they are related as follows:
Ex: the frames o0 and o1 are related as follows:
If the matrix A is also a rotation matrix Rz,θ (relative to o0) the rotation expressed in o1 is:
( ) 01
101 ARRB −
=
−=
001010100
01R
( )
−=
−
−
−==
−
θθθθθθ
θθ
cossin0sincos0
001
001010100
1000cossin0sincos
001010100
01
101 ARRB
Fag 3480 - Introduction to Roboticsside 33
Compositions of rotationsw/ respect to the current frame
Ex: three frames o0, o1, o2
This defines the composition law for successive rotations about the currentreference frame: post-multiplication
202
0
212
1
101
0
pRp
pRp
pRp
=
=
=21
201
0 pRRp = 12
01
02 RRR =
Fag 3480 - Introduction to Roboticsside 34
Compositions of rotationsEx: R represents rotation about the current y-axis by φ followed by θ about
the current z-axis
−
−=
−
−=
=
φθφθφθθ
φθφθφθθθθ
φφ
φφθφ
cossinsincossin0cossin
sinsincoscoscos
1000cossin0sincos
cos0sin010
sin0cos,, zy RRR
Fag 3480 - Introduction to Roboticsside 35
Compositions of rotationsw/ respect to a fixed reference frame (o0)
Let the rotation between two frames o0 and o1 be defined by R10
Let R be a desired rotation w/ respect to the fixed frame o0
Using the definition of a similarity transform, we have:
This defines the composition law for successive rotations about a fixed reference frame: pre-multiplication
( )[ ] 01
01
101
01
02 RRRRRRR ==
−
Fag 3480 - Introduction to Roboticsside 36
Compositions of rotationsEx: we want a rotation matrix R that is a composition of φ about y0 (Ry,φ) and then θ about z0
(Rz,θ)
the second rotation needs to be projected back to the initial fixed frame
Now the combination of the two rotations is:
( )θθθ
θθθ
,,,
,,1
,02
yzy
yzy
RRRRRRR
−
−
=
=
[ ] φθφθφφ ,,,,,, yzyzyy RRRRRRR == −
Fag 3480 - Introduction to Roboticsside 37
Compositions of rotationsSummary:
Consecutive rotations w/ respect to the current reference frame:
Post-multiplying by successive rotation matrices
w/ respect to a fixed reference frame (o0)
Pre-multiplying by successive rotation matrices
We can also have hybrid compositions of rotations with respect to the current and a fixed frame using these same rules
Fag 3480 - Introduction to Roboticsside 38
Parameterizing rotationsThere are three parameters that need to be specified to create
arbitrary rigid body rotations
We will describe three such parameterizations:
Euler angles
Roll, Pitch, Yaw angles
Axis/Angle
Fag 3480 - Introduction to Roboticsside 39
Parameterizing rotationsEuler angles
Rotation by φ about the z-axis, followed by θ about the current y-axis, then ψ about the current z-axis
−+−+−−−
=
−
−
−==
θψθψθ
θφψφψθφψφψθφ
θφψφψθφψφψθφ
ψψ
ψψ
θθ
θθ
φφ
φφ
ψθφ
csscsssccscsscccssccssccssccc
cssc
cs
sccssc
RRRR zyzZYZ
10000
0010
0
10000
,,,
Fag 3480 - Introduction to Roboticsside 40
Parameterizing rotationsRoll, Pitch, Yaw angles
Three consecutive rotations about the fixed principal axes:
Yaw (x0) ψ, pitch (y0) θ, roll (z0) φ
−+−+
++−=
−
−
−=
=
ψθψθθ
ψθφψφψθφψφθφ
ψθφψφψθφψφθφ
ψψ
ψψ
θθ
θθ
φφ
φφ
ψθφ
ccscscssscssscccs
cscssssccscc
cssc
cs
sccssc
RRRR xyzXYZ
00
001
0010
0
10000
,,,
Fag 3480 - Introduction to Roboticsside 41
Parameterizing rotationsAxis/Angle representation
Any rotation matrix in SO(3) can be represented as a single rotation about a suitable axis through a set angle
For example, assume that we have a unit vector:
Given θ, we want to derive Rk,θ:
Intermediate step: project the z-axis onto k:
Where the rotation R is given by:
=
z
y
x
kkk
k̂
1,,
−= RRRR zk θθ
αβθβαθ
βα
−−=⇒
=
,,,,,,
,,
zyzyzk
yz
RRRRRRRRR
Fag 3480 - Introduction to Roboticsside 42
Parameterizing rotationsAxis/Angle representation
This is given by:
Inverse problem:
Given arbitrary R, find k and θ
++−−+++−+
=
θθθθθθ
θθθθθθ
θθθθθθ
θ
cvkskvkkskvkkskvkkcvkskvkkskvkkskvkkcvk
R
zxzyyzx
xzyyzyx
yzxzyxx
k2
2
2
,
( )
−−−
=
−
= −
1221
3113
2332
1
sin21ˆ
21cos
rrrrrr
k
RTr
θ
θ
Fag 3480 - Introduction to Roboticsside 43
Alternative approachRotation matrices in SO(3) can be derived using an alternate method using the matrix
exponential
Assume that you have a unit vector, ω, that represents an axis of rotation
Take a vector q(t) and rotate it about ω with unity velocity
This gives:
Where the ‘cross-product’ matrix is given as follows:
Now integrate to find the vector q(t):
Rotating for θ units of time gives:
Thus the rotation about ω can be represented by the matrix exponential
For notation, we can call:
( ) ( )( )tq
tqtq
ωωˆ=
×=
−−
−=
00
0ˆ
12
13
23
ωωωω
ωωω
( ) ( )0ˆ qetq t ω=
( ) ( ) ( )00 ,ˆ qRqetq
θω
θω ==
( )3ˆ so∈ω
Fag 3480 - Introduction to Roboticsside 44
Rigid motionsRigid motion is a combination of rotation and translation
Defined by a rotation matrix (R) and a displacement vector (d)
the group of all rigid motions (d,R) is known as the Special Euclidean group, SE(3)
Consider three frames, o0, o1, and o2 and corresponding rotation matrices R21, and
R10
Let d21 be the vector from the origin o1 to o2, d1
0 from o0 to o1
For a point p2 attached to o2, we can represent this vector in frames o0 and o1:
( )3
3R∈
∈
dSOR
( ) ( )33 3 SOSE ×= R
( )01
12
01
212
01
01
12
212
01
01
101
0
12
212
1
ddRpRR
ddpRR
dpRp
dpRp
++=
++=
+=
+=
Fag 3480 - Introduction to Roboticsside 45
Homogeneous transformsWe can represent rigid motions (rotations and translations) as matrix
multiplication
Define:
Now the point p2 can be represented in frame o0:
Where the P0 and P2 are:
=
=
10
1012
121
2
01
010
1
dRH
dRH
212
01
0 PHHP =
=
=
1 ,
1
22
00 p
Pp
P
Fag 3480 - Introduction to Roboticsside 46
Homogeneous transformsThe matrix multiplication H is known as a homogeneous
transform and we note that
Inverse transforms:
( )3SEH ∈
−=−
101 dRRH
TT
Fag 3480 - Introduction to Roboticsside 47
Homogeneous transformsBasic transforms:
Three pure translation, three pure rotation
=
=
=
1000100
00100001
10000100
0100001
100001000010
001
,
,
,
c
b
a
cz
by
ax
Trans
Trans
Trans
−
=
−=
−
=
100001000000
100000001000
100000000001
,
,
,
γγ
γγ
γ
ββ
ββ
β
αα
ααα
cssc
cs
sc
cssc
z
y
x
Rot
Rot
Rot