Documente Academic
Documente Profesional
Documente Cultură
Spatial descriptions and Transformations Need to specify spatial attributes of various objects with which a manipulation system deals Cartesian coordinate frames are used
Position
Orientation
AP
px P = p y 3 pz
{A} yA
{B} xB
yB body frame
By attaching a coordinate frame to the body and then give a description of this coordinate frame relative to the reference coordinate frame
A rigid body
6
zB {B} xB
yB
A det( B R) = +1
Multiplication of rotation matrices generally not commutative
yB
x B x A = x B y A x B z A
yB xA yB yA yB zA
zB xA zB y A zB zA
yA xA
Remark: Components are direction cosines (dot product of two unit vectors yields the cosine of the angle between them) Choice of reference frame is arbitrary, but must be the same
x B x A = x B y A x B z A
yB xA yB yA yB zA
zB xA zB y A zB zA
yA xA
Note: Rows of the matrix are the unit vectors of {A} expressed in {B}
B xT A B T = y A = B xA B zT A
yA
B z A = A RT
B R = A RT
B A
A R =B RT
A xT B A T A A T A xB B R B R = yB A zT B
yB
z B = I3
A B
A B R 1 = B R T = A R
10
Uniqueness
xA
zA {A} yA
{B} xB
3 independent parameters
11
xAo , xA1
yA1
yAo
12
A0 A1
?
zA xB yA
yB
{B}
Given Find
P P
16
{A}
xA
AP
= BP + APBORG
17
Coordinates of P in B
A P= B R BP
Coordinates of P in A
Above equation assumes origins of Frames A & B are coincident. What if the two origins are not coincident?
18
Figure 1-1
xB 30o xA
1 A A B p = B R p = 1.732 0
20
A B
to describe Bp relative to frame {A}. The original vector p is not changed in space. We simply compute the new description of the vector relative to a new frame.
21
10
?
zA xB yA
{B}
Given Find
P P
{A}
xA
22
zA
{B}
{A}
xA
P = A R B P B
and
P = A PBORG + A P
23
A P = A PBORG + A R B P = A PBORG + B R B P B
11
zA
{B}
A P = APBORG + B R BP
Rotational transformation
{A}
xA
Translational transformation
24
Homogeneous Transformation
zB
p yB
A P = APBORG + B R BP
zA xB yA
{B}
P = AT BP B
{A}
xA
Homogeneous transformation
25
12
Homogeneous Transformation
B px B p B P = B y pz 1
A B
R T = 0
A B
PBORG 1
A px A p A P = A y pz 1
4x4 matrix
Augmented vectors
26
Homogeneous Transformation
Example 1-2 Figure 1-2 shows a frame {B} which is rotated relative to frame {A} about z by 30 degrees, and translated 10 units in xA , and 5 units in yA. Find Ap where Bp = [3 7 0]T.
Figure 1-2
27
13
Homogeneous Transformation
Solution:
0.866 0.5 0.5 0.866 A T = B 0 0 0 0
0.866 0.5 0.5 0.866 A p= AT Bp = B 0 0 0 0
0 10 0 5 1 0 0 1
0 10 3 9.098 0 5 7 12.562 = 1 0 0 0 0 1 1 1
That is,
A
9.098 p = 12.562 0
28
Homogeneous Transformation
Interpretation 1: T represents coordinate transformations in compact form
p yB
A B A BR T = 0 A
zB
zA xB yA
PBORG 1
{B}
{A}
xA
29
14
Homogeneous Transformation
Interpretation 2: T represents position & orientation of the coordinate frame {B} relative to {A}
zB yB
{B}
zA yA xB
A B
AR T = B 0
PBORG 1
{A}
xA
30
Homogeneous Transformation
Interpretation 3: T represents translation and rotation of the coordinate frame {A} to {B}
zB zA yB yA xA zA yA
31
{B}
xB
A B
A BR T = 0
PBORG 1
{A}
xA
15
Homogeneous Transformation
For free vectors (e.g. force, velocity, etc), augment the vectors with 0 rather than 1:
A px A p A P = A y pz 0
32
Homogeneous Transformation
Consecutive transformation:
zn-1 z1 yn-1 xn
p
zn yn
y1
{n-1}
xn-1
n
{n}
z0 x1 y0
{1}
Given
augmented position vector of P expressed in frame n homogeneous transformation matrix from frame i to frame i-1 (i = 1,,n) augmented position vector33 P of expressed in frame 0
{0}
x0
i 1 i
A
P
Find
16
Homogeneous Transformation
Consecutive transformation:
0 0 P = 1A1 A 2 n 1 n
A n P = n0 A n P
i 1 i
n
where
homogeneous transformation matrix from frame i to frame i-1 (i = 1,,n) augmented position vector of P expressed in frame n augmented position vector of P expressed in frame 0 homogeneous transformation from frame n to frame 0
P o P
0 1 1 A2 A n 1 n
A =0 A n
34
Homogeneous Transformation
Inverse of a Homogeneous Transformation Matrix A 1 A B Given BT , find AT or BT
By definition, i.e.
A BR 0 A
A B
T AT 1 = I B
PBORG X 1 0
=>
1 Y 0 = 1 0 0
0 0 0 1 0 0 I 33 0 = 0 1 0 0 1 0 0 1
A B
A B
RX = I
A A B X = B R 1 = B R T = A R
RY + APBORG = 0
=>
A A Y = B R 1 A PBORG = B RT A PBORG
35
17
Homogeneous Transformation
Inverse of a Homogeneous Transformation Matrix
A B RT B A 1 = AT = BT 0 A B RT A PBORG 1
36
Homogeneous Transformation
Example 1-4
Figure 1-5 shows a frame {B} which is rotated relative to frame {A} about z by 30 degrees, and translated four units in xA, and three units in yA. Find B T . A
Figure 1-5
37
18
Homogeneous Transformation
Solution:
0.866 0.5 0.5 0.866 A BT = 0 0 0 0 0 4 0 3 1 0 0 1
0 4.964 0 0.598 1 0 0 1
38
B A
R T = A T 1 = B 0
A B
Example 1-5
Assume we know B T in Figure 1-6, which describes the frame at the T manipulators fingertips {T} relative to the base of the manipulator, {B}. Also, we know where the tabletop is located in space relative to the manipulators base because we have a description of the frame {S} which is attached to the table as shown, BT . Finally, we know the location of the frame attached to the S S bolt lying on the table relative to the table frame, that is, GT . Calculate the T position and orientation of the bolt relative to the manipulators hand, GT .
Figure 1-6
39
19
Solution:
T G
S S T = T T BT GT = BT 1 BT GT B S T S
40
41
20
xA
{A}
yA
1 0 A P2 = 0 0
0 1 0 0
0 qx 0 qy A P1 1 qz 0 1
RK()AP1
21
44
Figure 1-3
45
22
46
T AP1
(1-3)
47
23
48
0 10 3 9.098 0 5 7 12.562 = 1 0 0 0 0 1 1 1
Note that this example is numerically similar to Example 1-2, but the interpretation is different. 49
24
X (roll)
Y (pitch)
Z (yaw)
51
Each of the three rotations takes place about an axis in the fixed reference frame, {A}
25
A B
RXYZ ( , , ) = RZ ( ) RY ( ) RX ( ) c s 0 c 0 = s c 0 0 1 0 0 1 s 0 c c c s s s c = s c s s s + c c s c s s 1 0 0 c 0 c s c 0 c s 0 s c
+ s s s s c c s c c
52
Given
A B
26
= A tan 2( s , c )
2 2 = A tan 2( r31 , r11 + r21 )
Remark: Atan2(y,x) computes tan-1(y/x) and uses signs of both x and y to determine the quadrant in which the angle lies
54
= A tan 2( s , c )
= A tan 2( r21 r11 , ) c c
55
27
= A tan 2( s , c )
= A tan 2( r32 r33 , ) c c
56
= A tan 2(
r21 r11 , ) c c
= A tan 2(
r32 r33 , ) c c
Remark: 2 solutions If |r31|=1 (implies r11 = r21 = r32 = r33= 0), the solution degenerates (mathematical singularity) such that only the difference of and may be computed: c s s s c c s c + s s 0 r12 r13 0 0 r = 0 r23 s s s + c c s s c c s 22 r31 0 0 s 0 0 If r31 = +1: = A tan 2( 1, 0) = 900 C If r31 = -1: = A tan 2(1, 0) = 900 C
=> + = Atan2 (-r23 , r22) => - = Atan2 (r23 , r22)
57
28
Each rotation is performed about an axis of the moving frame {B}, rather than the fixed reference frame, {A}
58
B R = BAR BR BR B
RZ Y X ( , , ) = RZ ( ) RY ( ) RX ( ) c s 0 c 0 = s c 0 0 1 0 0 1 s 0 c c c s s s c = s c s s s + c c s c s s 1 0 0 c 0 c s c 0 c s 0 s c
Note: Same as the result obtained for the same three rotations taken in the opposite order about fixed axes.
+ s s s s c c s c c
59
29
60
61
30
RK ( ) =
k y k x v - k z s k y k y v + c k y k z v + k x s k z k x v + k y s k z k y v - k x s (1-4) k z k z v + c
T
A
k x k x v + c k x k y v + k z s k k v - k s y x z
K = 1 (unit vector)
Remark: For small angular rotations, axis of rotation becomes ill-defined. Non-unique representation: R K ( ) = R K ( )
62
A frame {B} is described as follow: initially coincident with {A} we rotate {B} about the vector Ak = [0.707 0.707 0]T (passing through the origin) by an amount = 30 degrees. Give the frame description of {B} with reference to {A} after the rotation.
63
31
k x k x v + c Rk ( ) = k x k y v + k z s k k v - k s y x z
k y k x v - k z s k y k y v + c k y k z v + k x s
k z k x v + k y s k z k y v - k x s k z k z v + c
64
Solution:
Before performing the rotation, {A} and {B} are coincident. We define two new frames, {A} and {B} which are obtained by translating {A} and {B}, respectively, to point P. {B} and {B} can be treated as if they are mounted on the same rigid body, whereas {A} and {A} are fixed in the space.
65
32
0 1 0 0
0 1 0 0
0 0 1 0
1 2 3 1
0 1 0 2 1 3 0 1
66
k x k x v + c R k ( ) = k x k y v + k z s k k v - k s y x z
k y k x v - k z s k y k y v + c k y k z v + k x s
k z k x v + k y s k z k y v - k x s k z k z v + c
( )
0 0 0 1
67
33
Note: After rotating about the axis k , {B} becomes separated from {A} as shown in Fig. 1-9.
Figure 1-9
68
Find A K ,
given
nx ox ax Let R = ny oy a y n o a z z z
A B
69
34
k y k x v - k z s n x o x a x k x k x v + c RK ( ) = n y o y a y = k x k y v + k z s k y k y v + c n o a k k v - k s k k v + k s y y z x z z z x z
From the diagonal elements, A Trace ( B R ) = 1 + 2cos =>
A
k z k x v + k y s k z k z v + c k z k y v - k x s
where v = (1 - cos)
cos = ( Trace (B R ) 1 )
+A -A
70
k z k x v + k y s k z k y v - k x s k z k z v + c
ky =
ax - nz 2 sin oz - a y kx = 2 sin
kz =
n y - ox 2 sin
71
35
K
In general: 2 solutions
(2)
AK
72
If = 0
A B
1 0 0 R = 0 1 0 0 0 1
If = 180
- 1 + 2k x 2 2k x k y 2k x k z 2 A 2k k - 1 + 2k y 2k y k z BR = x y 2 2k k 2k y k z - 1 + 2k z x z
( symmetric )
73
36
If = 180 (cont)
2 2k x k y 2k x k z n x o x a x -1 + 2k x A o y a y = 2k x k y -1 + 2k y 2 2k y k z BR = ny n o a 2k y k z -1 + 2k z 2 z z z 2k x k z
kx = ky = kz = ny 2k x az 2k x
nzn y 2o z
If = 180 (cont)
If all off-diagonal terms are 0, one of kx, ky or kz = 1 & the rest are 0s. The component of K that is 1 has a A value of 1 in the diagonal of B R . E.g. kx = 1, ky = kz = 0
1 0 0 A 0 B R = 0 -1 0 0 -1
75
37
1 = k x sin
2 = k y sin
3 = k z sin
4 = cos
77
38
4 =
78
1 2
39