Math_kinematics intro

advertisement
What is
Kinematics
Kinematics studies the motion of
bodies
Joints for
Robots
An Example - The PUMA 560
2
3
4
1
There are two more
joints on the end
effector (the gripper)
The PUMA 560 has SIX revolute joints
A revolute joint has ONE degree of freedom ( 1 DOF) that is
defined by its angle
Concepts:
- Revolute joint
- DOF
Other basic joints
Revolute Joint
1 DOF ( Variable - )
Prismatic Joint
1 DOF (linear) (Variables - d)
Spherical Joint
3 DOF ( Variables - 1, 2, 3)
Concepts:
- Prismatic joint
- Spherical joint
We are interested in two kinematics topics
Forward Kinematics (angles to position)
What you are given:
The length of each link
The angle of each joint
What you can find:
The position of any point
(i.e. it’s (x, y, z) coordinates
Inverse Kinematics (position to angles)
What you are given:
The length of each link
The position of some point on the robot
What you can find:
The angles of each joint needed to obtain
that position
Concepts:
- Forward Kinematics
- Inverse Kinematics
Math Review
Review of
Vectors and
Matrices
Dot Product and Unit Vector
Dot Product:
a x 
a 
 y
Geometric Representation:
A  B  A B cosθ
A
b x 
b 
 y
θ
B
Matrix Representation:
a x  b x 
A  B        a xb x  a y b y
a y  b y 
Unit Vector
Vector in the direction of a chosen vector but whose magnitude is 1.
B
uB 
B
B
uB
Concepts:
- Dot Product
- Unit Vector
More on Dot Product
Review of
Matrices
Quick Matrix Review
Matrix Multiplication:
An (m x n) matrix A and an (n x p) matrix B, can be multiplied since
the number of columns of A is equal to the number of rows of B.
Non-Commutative Multiplication
AB is NOT equal to BA
a b   e
c d    g

 
Matrix Addition:
a b   e
c d    g

 
f  ae  bg 


h  ce  dg 
f   a  e 


h  c  g 
af  bh
cf  dh
b  f 
d  h
Concepts:
- Matrix Multiplication
Matrix Addition
Inversion of Matrices
Translation
Basic Transformations
Concepts:
- Translation along the X
axis
Moving Between Coordinate Frames
Translation Along the X-Axis
Y
O
(VN,VO)
VO
P
VN
X
Px
Px = distance between the XY and NO coordinate planes
Notation:
V
XY
V X 
  Y
V 
V
NO
V N 
  O
V 
Px 
P 
0
N
Writing V XY in terms of V NO
Y
O
VO
P
X
V XY

VN
PX  V N 
NO


P

V

O
V


N
Translation along the X-Axis and Y-Axis
O
Y
VO
VN
X
V XY  P V NO
P
XY
N
 Px 
 
PY 
PX  V N 

O
P

V
 Y

Concepts:
- Translation along the X axis and
Y axis
Using Basis Vectors
Basis vectors are unit vectors that point along a coordinate axis
O
n
o
Unit vector along the N-Axis
Unit vector along the O-Axis
V NO
Magnitude of the VNO vector
VO
o
n
V NO
VN
N
NO
V NO cosθ  V NO  n 
V N   V cosθ 
  O    NO
   NO
   NO 
V   V sinθ   V cos(90  θ)  V  o 
Concepts:
- Using planar trigonometry to calculate the vector from
projections
Rotation
Y
Rotation (around the Z-Axis)
X
Z
Y
We rotate around Z
and we have two
frames of reference
for the same vector
V
VY

VX
X
 = Angle of rotation between the XY and NO coordinate axis
V XY
V X 
  Y
V 
Concepts:
Rotation around Z-Axis
V NO
V N 
  O
V 
x
Y
V
Unit vector along X-Axis
Can be considered with respect to
the XY coordinates or NO coordinates
V
V XY
 V NO
VY


X
VX
V X  V XY cosα  V NO cosα  V NO  x
V  (V  n  V  o)  x
X
N
O
(Substituting for VNO using the N and O
components of the vector)
V X  V N (x  n )  V O (x  o)
 V N (cosθ)  V O (cos(θ  90))
 V N (cosθ)  V O (sinθ)
Concepts:
Rotation around Z-Axis
Similarly….
V Y  V NO sinα  V NO cos(90  α)  V NO  y
V Y  (V N  n  V O  o)  y
V Y  V N (y  n)  V O (y  o)
 V N (cos(90  θ))  V O (cosθ)
 V N (sinθ)  V O (cosθ)
So….
V  V (cosθ)  V (sinθ)
X
N
O
V Y  V N (sinθ)  V O (cosθ)
V XY
V X 
  Y
V 
Written in Matrix Form
V
XY
V X  cosθ  sinθ V N 
  Y  
 O

V  sinθ cosθ  V 
Concepts:
Rotation around Z-Axis
Rotation Matrix about the z-axis
Rotation
together with
translation
Y1
(VN,VO)
Y0
VNO
VXY

P
X1
Translation along P followed by rotation by 
X0
V
XY
V X  Px  cosθ
  Y     
V  Py   sinθ
 sinθ V N 


cosθ  V O 
(Note : Px, Py are relative to the original coordinate frame. Translation followed by
rotation is different than rotation followed by translation.)
In other words, knowing the coordinates of a point (VN,VO) in some coordinate
frame (NO) you can find the position of that point relative to your original
coordinate frame (X0Y0).
Concepts:
Rotation around Z-Axis
HOMOGENEOUS
REPRESENTATION
for robot kinematics
1. One of important representations in robotics
2. Putting it all into a Matrix
HOMOGENEOUS REPRESENTATION
Putting it all into a Matrix
V
XY
V X  Px  cosθ
  Y     
V  Py   sinθ
 sinθ V N 


cosθ  V O 
V X   Px  cosθ


 V Y   Py    sinθ
 1   1   0


 sinθ
cosθ
0
V X  cosθ


 V Y    sinθ
 1   0


cosθ
H   sinθ
 0
 sinθ
cosθ
0
 sinθ
cosθ
0
Px 
Py 
1 
What we found by doing a
translation and a rotation
0  V N 


0 V O 
1  1 
Px   V N 


Py  V O 
1   1 
Padding with 0’s and 1’s
Simplifying into a matrix form
Homogenous Matrix for a Translation in
XY plane, followed by a Rotation around
the z-axis
Concepts:
All transformations can be put into one Matrix Notation.
Rotation
Matrices
in 3D
How to represent a
sequence of translations
and rotations, a case
common in robot arm
design?
Homogeneous Matrices in 3D
H is a 4x4 matrix that can describe a translation, rotation, or both
in one matrix
O
Y
N
P
X
A
Translation without rotation
1
0
H
0

0
0 0 Px 
1 0 Py 
0 1 Pz 

0 0 1
n x
n
H y
n z

0
ox
oy
oz
ax
ay
az
0
0
Z
Y
O
N
X
Z
Rotation without translation
A
0
0
0

1
Rotation part:
Could be rotation around z-axis,
x-axis, y-axis or a combination of
the three.
Homogeneous Continued…. combining rotation and
translation to one matrix
V
V XY
XY
V N 
 O
V 

H A
V 
 
 1 
n x
n
 y
n z

0
The (n,o,a) position of a point relative to the
current coordinate frame you are in.
ox
ax
oy
oz
0
ay
az
0
Px  V N 
 
Py  V O 
Pz  V A 
 
1   1 
V X  n x V N  o x V O  a x V A  Px
The rotation and translation part can be combined into a single
homogeneous matrix IF and ONLY IF both are relative to the
same coordinate frame.
Finding the Homogeneous Matrix
EXAMPLE.
W N 
 O
W 
W A 


Y
T
P
X
Z
W X 
 Y  Point relative to the
 W  X-Y-Z frame
WZ 


 W   Pi   n i
 J   
 W    Pj    n j
 W K  Pk  n k


I
oi
oj
ok
 WI 
 J  Point relative to the
 W  I-J-K frame
W K 


ai  W 
 O

a j  W 
a k   W A 
N
Different notation for the same thing
 WI   ni
 J 
 W   n j
 W K  n k

 
 1   0
W N 
 O  Point relative to the
 W  N-O-A frame
W A 


oi
ai
oj
ok
0
aj
ak
0
Pi   W N 


Pj   W O 
Pk   W A 


1   1 
W N 
 O
W 
W A 


Y
T
P
X
Z
 W  Tx  i x
 Y   
 W   Ty   i y
 W Z  Tz  i z


X
W 


Substituting for  W J 
W K 


I
jx
jy
jz
 W X  i x
 Y 
 W   i y
 W Z  i z

 
1

  0
k x  W 
 J

k y  W 
k z   W k 
I
 W X  i x
 Y 
 W   i y
 W Z  i z

 
 1   0
jx
kx
jy
jz
0
ky
kz
0
Tx   n i
Ty   n j
Tz  n k

1  0
jx
kx
jy
jz
0
ky
kz
0
oi
ai
oj
ok
0
aj
ak
0
Tx   W I 


Ty   W J 
Tz   W K 


1   1 
Pi   W N 


Pj   W O 
Pk   W A 


1   1 
W X 
W N 
 Y
 O
W

  H W 
WZ 
W A 




 1 
 1 
i x
i
H y
i z

0
jx
jy
jz
kx
ky
kz
0
0
Tx   n i
Ty   n j
Tz  n k

1  0
oi
oj
ok
ai
aj
ak
0
0
Pi 
Pj 
Pk 

1
Product of the two matrices
Notice that H can also be written as:
1
0
H
0

0
0 0 Tx  i x
1 0 Ty  i y
0 1 Tz  i z

0 0 1  0
jx
jy
jz
kx
ky
kz
0
0
0 1
0 0
0  0

1  0
0 0 Pi   n i
1 0 Pj   n j
0 1 Pk  n k

0 0 1  0
oi
oj
ok
ai
aj
ak
0
0
0
0
0

1
H = (Translation relative to the XYZ frame) * (Rotation relative to the XYZ frame)
* (Translation relative to the IJK frame) * (Rotation relative to the IJK frame)
The Homogeneous Matrix is a concatenation of numerous
translations and rotations
W N 
 O
W 
W A 


Y
T
X
P
Z
One more variation on finding H:
H=
(Rotate so that the X-axis is aligned with T)
* ( Translate along the new t-axis by || T || (magnitude of T))
* ( Rotate so that the t-axis is aligned with P)
* ( Translate along the p-axis by || P || )
* ( Rotate so that the p-axis is aligned with the O-axis)
1.
2.
This method might seem a bit confusing, but it’s actually an easier way
to solve our problem given the information we have.
Here is an example…
Frames of Reference
and transformations:
EULER ANGLES
Rotation Matrices in 3D - towards homogenous
representation
 sinθ
cosθ
R z   sinθ
 0
cosθ
0
 cosθ
R y   0
 sinθ
1
R z  0
0
0
cosθ
sinθ
0
1
0
0
0
1
sinθ 
0 
cosθ

 sinθ
cosθ 
Rotation around the Z-Axis
Rotation around the Y-Axis
0
Rotation around the X-Axis
The Rotation Matrix
(called also Direction Cosine
Matrix)
Download