1 kinematics ( 運動學 ) primer jyun-ming chen fall 2009
TRANSCRIPT
![Page 1: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/1.jpg)
1
Kinematics ( 運動學 ) Primer
Jyun-Ming ChenFall 2009
![Page 2: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/2.jpg)
2
Contents
General Properties of Transform2D and 3D Rigid Body Transforms DOF (degree of freedom) Representation Computation Conversion …
Transforms for Hierarchical Objects
![Page 3: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/3.jpg)
3
Kinematic Modeling
Two interpretations of transform “Global”:
An operator that “displaces” a point (or set of points) to desired location
“Local”: specify where
objects are placed in WCS by moving the local frame
Explain these concepts via 2D translationVerify that the same holds for rotation, 3D, …
![Page 4: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/4.jpg)
4
Ex: 2D translation (move point)
x
y
p
The transform, as an operator, takesp to p’, thus changing the coordinate of p:
Tr(t) p = p’
p’
1
4
4
1
22
31
1
2
1
100
210
301
Tr(t)
![Page 5: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/5.jpg)
5
Ex: 2D translation (move frame)
p’
x
y
x’
y’
p
The transform moves the xy-frame tox’y’-frame and the point is placedwith the same local coordinate.
To determine the corresponding position of p’ in xy-frame:
frame y' x' toframe- xys that take transform the:
y'-framein x' of coordinate the:
frame-in xy of coordinate the:
''
''
''''
T
pp
pp
ppT
xyyx
yx
xy
xyyxxyyx
1
4
4
1
22
31
1
2
1
100
210
301
Tr(t)
![Page 6: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/6.jpg)
6
Properties of Transform
Transforms are usually not commutable TaTb p TbTa p (in
general)
Rigid body transform: the ones
preserving the shape
Two types: rotation rot(n,) translation tr(t)
Rotation axis n passes thru
origin
![Page 7: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/7.jpg)
7
Rigid Body Transform
transforming a point/object rot(n,) p; tr(t) p
not commutable rot(n,) tr(t) p tr(t) rot(n,) p
two interpretations (local vs. global axes, see next pages)
![Page 8: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/8.jpg)
8
Hierarchical Objects
For modeling articulated objects Robots, mechanism, …
Goals: Draw it Given the configuration, able to
compute the (global) coordinate of every point on body
![Page 9: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/9.jpg)
9
Ex: Two-Link Arm (2D)
Configuration Link 1: Box (6,1);
bend 45 deg Link 2: Box (8,1);
bend 30 deg
Goals: Draw it find tip position
x
y
x
y
![Page 10: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/10.jpg)
10
Ex: Two-Link Arm
Tr(0,6) Rot(z,45)Rot(z,30)
Tip pos:(0,8)
8
0Rot(z,30)Tr(0,6)Rot(z,45)
Tip Position:
T for link1: Rot(z,45) Tr(0,6) Rot(z,30)
T for link2: Rot(z,45)
![Page 11: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/11.jpg)
11
Ex: Two-Link Arm
Rot(z,45)
x’
y’
Tr(0,6’)
x”
y”
Rot(z”,30)Tip pos:(0’”,8’”)
x”’
y’”
8
0Rot(z,45))Tr(0,6',30)Rot(z"
),T(),T(),T(
),T()','T()","T(
shown that becan It
112233
332211
ppp
ppp
Thus, two views are equivalent
The latter might be easier tovisualize.
![Page 12: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/12.jpg)
12
2D KinematicsRigid body transform only consists of Tr(x,y) Rot(z,)
Computation: 3x3 matrix is
sufficient to realize Tr and Rot
)Rot(z, ),Tr(
100
cossin
sincos
T
general,In
yxy
x
ttt
t
100
0cossin
0sincos
)Rot(z,
100
10
01
),Tr(
y
x
yx t
t
tt
![Page 13: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/13.jpg)
13
3D Kinematics
Consists of two parts 3D rotation 3D translation
The same as 2D
3D rotation is more complicated than 2D rotation (restricted to z-axis)Next, we will discuss the treatment for spatial (3D) rotation
![Page 14: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/14.jpg)
14
DOF (degree of freedom)
… of a system of moving bodies is the number of independent variables required to specify the configuration… is closely related to kinematic representation(# of independent variables) = (# of total variables) ̶ (# of equality constraints)
![Page 15: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/15.jpg)
15
DOF of …
A particle in R2
R3
A rigid body inR2
R3
2
3
3
2
4 (Plucker coordinates)
a line in R2 a line in R3
a plane in R3
3
6
![Page 16: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/16.jpg)
16
3D Rotation Representations
Euler anglesAxis-angle3X3 rotation matrixUnit quaternion
Learning Objectives Representation
(uniqueness) Perform rotation Composition Interpolation Conversion among
representations …
![Page 17: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/17.jpg)
17
Euler AnglesRoll, pitch, yaw
Ref: http://www.fho-emden.de/~hoffmann/gimbal09082002.pdf
Gimbal lock: reduced DOF due to overlapping axes
![Page 18: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/18.jpg)
Weird Interpolation …
18
Previous[-26, -90, 127]
Next[71, 68, -105]
![Page 19: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/19.jpg)
19
Axis-Angle Representation
Rot(n,) n: rotation axis (global) : rotation angle (rad. or deg.) follow right-handed rule
Rot(n,)=Rot (-n,-)Problem with null rotation: rot(n,0), any nPerform rotation Rodrigues formula (next page)
Interpolation/Composition: poor Rot(n2,2)Rot(n1,1) =?= Rot(n3,3)
![Page 20: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/20.jpg)
20
Rodrigues Formula
v’=R v
r
v
v’
References:
http://mesh.caltech.edu/ee148/notes/rotations.pdf
http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/as5/rotation.html
r : unit vector (axis)
This is the “cross-product matrix”r v = r v
This is the “cross-product matrix”r v = r v
![Page 21: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/21.jpg)
21
Rotation Matrix (xy plane)
z
100
0cossin
0sincos
),(
100
0cossin
0sincos
zRot
z
y
x
z
y
x
![Page 22: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/22.jpg)
22
Rotation Matrix
About y axis
Rodrigues formulaAbout any axis
x
y,y’
zz’
x’
cos0sin
010
sin0cos
),(yRot
![Page 23: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/23.jpg)
Supplemental (rotation matrix & axis-angle)
Rot (a, ) Q Rot (a, ) Q
Q Rot (a, )Q Rot (a, )
Ref: url (local)
![Page 24: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/24.jpg)
24
Rotation Matrix
Three columns of R: the transformed basesPerform rotation:
x’ = Rx
Rx
uRxuRxuRx
uxuxuxx
uuuaR ij
ˆˆˆ
ˆˆˆ
ˆˆˆ
332211
332211
321
332211 ˆˆˆ uxuxuxx
x
y,y’
zz’
x’
![Page 25: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/25.jpg)
25
Rotation Matrix (example)
x
y
z y’
z’
x’
100
010
001
R
x
y
z
x’
y’
z’
100
001
010
R
![Page 26: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/26.jpg)
26
Rotation Matrix (cont)
Composition: trivial orthogonalization
might be required due to FP errors
Interpolation: ?
xRRxRRxRx
xRx
12122
1
![Page 27: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/27.jpg)
27
Gram-Schmidt Orthogonalization
If 3x3 rotation matrix no longer orthonormal, metric properties might change!
321321 ˆˆˆˆˆˆ vvvuuu
222
231
11
1333
111
1222
11
ˆˆˆ
ˆˆˆ
ˆˆ
ˆˆˆˆ
ˆˆˆ
ˆˆˆˆ
ˆˆ
vvv
vuv
vv
vuuv
vvv
vuuv
uv
Verify!
![Page 28: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/28.jpg)
28
Transformation Matricesv = Huv = Hu
1000
000
000
000
),,(z
y
x
zyx s
s
s
sssScale
Translation Rotation (about principal axes)
Scaling
111000
000
000
000
1
zs
ys
xs
z
y
x
s
s
s
z
y
x
z
y
x
z
y
x
![Page 29: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/29.jpg)
29
Translation (math)
![Page 30: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/30.jpg)
30
Frame
1010
0
10RotTrans
Translate , Rotate
tRRtI
thenfirst
y
z
x
tx
y
z
R
Object coordinates
Recall how we did the spotlight beam!
![Page 31: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/31.jpg)
31
Quaternion
A mathematical entity invented by HamiltonDefinition
jikki
ikjjk
kjiij
kji
qqkqjqiqqq
1222
03210
i
j k
![Page 32: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/32.jpg)
32
Quaternion (cont)
Operators Addition
Multiplication
Conjugate
Length
kqpjqpiqpqpqp
kqjqiqqq
kpjpippp
33221100
3210
3210
qpqppqqpqppq 0000
qqq 0
* *** pqpq
23
22
21
20
* qqqqqqq
![Page 33: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/33.jpg)
33
Unit Quaternion
Define unit quaternion as follows to represent rotation
Example Rot(z,90°)
q and –q represent the same rotation Null rotation: q = [1,0,0,0]
nqn ˆsincos),ˆ(Rot 22 1q
22
22 00q
Why “unit”?
DOF point of view!
![Page 34: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/34.jpg)
34
Example
x
y
z
x
y
z
22
22 00q
100
001
010
Rot (90, 0,0,1) OR Rot (-90,0,0,-1)
![Page 35: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/35.jpg)
35
Unit Quaternion (cont)
Perform Rotation
Composition
Interpolation Linear Spherical linear (slerp, more later)
)(22)(
...
020
*
xqqxqqxqqq
qxqx
****
*
)()( qpxqpqpxpqqxqx
pxpx
)(
)(,)1()( 21
tp
tpptppttp
![Page 36: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/36.jpg)
36
Example
x
y,x’
z,z’
y’
1
2
1
1
1
2
100
001
010
100
001
010
Rpp
R
Rot(z,90°)Rot(z,90°)
p(2,1,1)
![Page 37: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/37.jpg)
37
Example (cont)
1
2
1
1
0
0
0
2
1
)(0
0
2
112
002
1
1
2
)(
)(22)(
22
22
22
22
21
21
020
kji
pqqpqqpqqqp
2
222 00
1120
q
p
![Page 38: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/38.jpg)
38
Example
x
y,x’
z,z’
y’
)00()001(sincos
)00()100(sincos
22
22
290
290
2
22
22
290
290
1
q
q
x,x’
y
z,y’z’
)(
)00()00(
00
00
)00()00(
)00)(00(
:nCompositio
21
21
21
21
22
22
22
22
22
22
22
22
22
22
22
22
22
22
12
kji
![Page 39: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/39.jpg)
39
Matrix Conversion
23
22
21
2010322031
103223
22
21
203021
2031302123
22
21
20
)(2)(2
)(2)(2
)(2)(2
qqqqqqqqqqqq
qqqqqqqqqqqq
qqqqqqqqqqqq
R
100
001
010
00 22
22
3210
R
qqqqq
![Page 40: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/40.jpg)
40
Matrix Conversion (cont)
33221123
33221122
33221121
33221120
14
1
14
1
14
1
14
1
rrrq
rrrq
rrrq
rrrq
32234
132
311341
31
211241
21
122141
30
311341
20
233241
10
rrqq
rrqq
rrqq
rrqq
rrqq
rrqq
Find largest qi2; solve the rest
![Page 41: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/41.jpg)
41
Spherical Linear Interpolation
33221100cos
sin
sin
sin
)1(sin)(
rqrqrqrq
rt
qt
ts
The computed rotation quaternion rotates about a fixed axis at constant speed
References:http://www.gamedev.net/reference/articles/article1095.asphttp://www.diku.dk/research-groups/image/teaching/Studentprojects/Quaternion/http://www.sjbrown.co.uk/quaternions.htmlhttp://www.theory.org/software/qfa/writeup/node12.html
q
r
unit sphere in R4
![Page 42: 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009](https://reader033.vdocuments.pub/reader033/viewer/2022061518/56649dff5503460f94ae77d0/html5/thumbnails/42.jpg)
42
Spatial Displacement
Any displacement can be decomposed into a rotation followed by a translationMatrix
Quaternion
TxxdR
Tz
y
x
x
dRxx
10
,
1
dqxqx *