Académique Documents
Professionnel Documents
Culture Documents
Ashutosh Saxena
Basic joints
Revolute Joint 1 DOF ( Variable - !)
Y1
(VN,VO)
Y0
VNO VXY
!
P
X0
X1
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).
HOMOGENEOUS REPRESENTATION
Putting it all into a Matrix
XY
V X Px cos = Y = + V Py sin
V X Px cos = V Y = Py + sin 1 1 0 V X cos = V Y = sin 1 0 sin cos 0
Px Py 1
sin V N cos V O
sin cos 0 0 V N 0 V O 1 1
Px V N Py V O 1 1
cos H = sin 0
sin cos 0
Homogenous Matrix for a Translation in XY plane, followed by a Rotation around the z-axis
Rotation Matrices in 3D
cos R z = sin 0 cos R y = 0 sin 1 R z = 0 0 0 cos sin sin cos 0 0 1 0 0 0 1
Rotation around the Z-Axis
Homogeneous Matrices in 3D
H is a 4x4 matrix that can describe a translation, rotation, or both in one matrix
O Y P X Z Y O N X Z A A N
1 0 H = 0 0
n x n H = y n z 0
0 0 Px 1 0 Py 0 1 Pz 0 0 1
ox oy oz 0 ax ay az 0 0 0 0 1
Rotation part: Could be rotation around z-axis, x-axis, y-axis or a combination of the three.
Forward Kinematics
The Situation: You have a robotic arm that starts out aligned with the xo-axis. You tell the first link to move by !1 and the second link to move by !2. The Quest: What is the position of the end of the robotic arm? Solution: 1. Geometric Approach This might be the easiest solution for the simple situation. However, notice that the angles are measured relative to the direction of the previous link. (The first link is the exception. The angle is measured relative to its initial position.) For robots with more links and whose arm extends into 3 dimensions the geometry gets much more tedious. 2. Algebraic Approach Involves coordinate transformations.
Example Problem: You are have a three link arm that starts out aligned in the x-axis. Each link has lengths l1, l2, l3, respectively. You tell the first one to move by !1 , and so on as the diagram suggests. Find the Homogeneous matrix to get the position of the yellow dot in the X0Y0 frame.
Y3
!3
Y2
!2
2
X2
X3
1
X1
!1
X0
i.e. Rotating by !1 will put you in the X1Y1 frame. Translate in the along the X1 axis by l1. Rotating by !2 will put you in the X2Y2 frame. and so on until you are in the X3Y3 frame. The position of the yellow dot relative to the X3Y3 frame is (l1, 0). Multiplying H by that position vector will give you the coordinates of the yellow point relative the the X0Y0 frame.
Y1
Slight variation on the last solution: Make the yellow dot the origin of a new coordinate X4Y4 frame
Y3 Y4
!3
Y2
!2
2
X2
X3
3
X4
Y0
1
X1
This takes you from the X0Y0 frame to the X4Y4 frame. The position of the yellow dot relative to the X4Y4 frame is (0,0).
Notice that multiplying by the (0,0,0,1) vector will equal the last column of the H matrix.
Y1
X 0 Y 0 = H Z 0 1 1
Inverse Kinematics
From Position to Angles
A Simple Example
Finding !:
y = arctan( ) x
arctan2() specifies that its in the first quadrant
More Specifically:
y = arctan 2( ) x
S Finding S:
!1
X
S = (x 2 + y 2 )
l2
Redundancy:
A unique solution to this problem does not exist. Notice, that using the givens two solutions are possible. Sometimes no solution is possible.
l2 l1
!1
l1
(x , y)
l2
l1
!1
x 2 + y 2 l1 l2 cos( 2 ) = 2l1l2
(1) 2 + (2) 2 = x 2 + y 2 = = l1 c1 + l2 (c1+ 2 ) 2 + 2l1l2 c1 (c1+ 2 ) + l1 s1 + l2 (sin1+ 2 ) 2 + 2l1l2 s1 (sin1+ 2 ) = l1 + l2 + 2l1l2 (c1 (c1+ 2 ) + s1 (sin1+ 2 ) ) = l1 + l2 + 2l1l2 c 2
2 2 2 2 2 2
) (
Only Unknown
2 2
Note :
+ cos(a b) = (cos a)(cos b) (sin a)(sin b) + + sin( a b) = (cos a)(sin b) + (cos b)(sin a)
x + y l1 l2 2 = arccos 2l1l2
Note :
+ cos(a b) = (cos a)(cos b) (sin a)(sin b) + + sin( a b) = (cos a)(sin b) + (cos b)(sin a)
We know what 2 is from the previous slide. We need to solve for 1 . Now we have two equations and two unknowns (sin 1 and cos 1 )
x + s1 (l 2 s 2 ) y= (l 2 s 2 ) + s1 (l1 + l 2 c 2 ) (l1 + l 2 c 2 ) =
s1 =
y(l1 + l 2 c 2 ) x l 2 s 2 x 2 + y2
y(l1 + l2 c 2 ) x l2 s2 1 = arcsin x 2 + y2
Alternative approaches?
End of lecture
A B = A B cos
Matrix Representation:
b x b y
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
uB
a b e c d g
f (ae + bg ) = (ce + dg ) h
(af + bh ) (cf + dh )
Matrix Addition:
a b e c d + g f (a + e ) = (c + g ) h
(b + f ) (d + h)
Basic Transformations
Moving Between Coordinate Frames
Translation Along the X-Axis
Y O
(VN,VO)
VX
VO
P
X
VN
XY
V X = Y V
NO
V N = O V
Px P = 0
Writing V XY in terms of V NO
Y O
VX
X
VO
! VN
V XY
PX + V N = = P +V NO V O
VO
VX
PX
X
VN
XY
Px = PY
V XY = P +V NO
PX + V N = O PY + V
n o
Unit vector along the N-Axis Unit vector along the N-Axis Magnitude of the VNO vector
VO
V NO
VN
V NO
Y X
V
VY
!
VX
V XY
V X = Y V
V NO
V N = O V
VX
V X = V XY cos = V NO cos = V NO x
V = (V n + V o) x
V XY = V NO
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 XY
V X = Y V
XY
W N O W W A
W Pi n i J W = Pj + n j W K Pk n k
oi oj ok
a i W a j W O ak W A
W I n i J W = n j W K n k 1 0
oi oj ok 0
ai aj ak 0
Pi W N Pj W O Pk W A 1 1
Homogeneous Continued.
V N O V =H A V 1
The (n,o,a) position of a point relative to the current coordinate frame you are in.
XY
V XY
n x n = y n z 0
ox oy oz 0
ax 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.
Y T X Z
K
W N O W W A
P A
W Tx i x Y W = Ty + i y W Z Tz i z
jx jy jz
k x W k y W J k z W k
W X i x Y W = i y W Z i z 1 0 jx jy jz 0 kx ky kz 0 Tx n i Ty n j Tz n k 1 0 oi oj ok 0
jx jy jz 0
kx ky kz 0
Tx W I Ty W J Tz W K 1 1
W Substituting for W J W K
W X i x Y W = i y W Z i z 1 0
ai aj ak 0
Pi W N Pj W O Pk W A 1 1
W X W N Y O W W = H A W Z W 1 1
i x i H = y i z 0
jx jy jz 0
kx ky kz 0
Tx n i Ty n j Tz n k 1 0
oi oj ok 0
ai aj ak 0
Pi Pj Pk 1
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 0
kx ky kz 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 0
ai aj ak 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)
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) This method might seem a bit confusing, but its actually an easier way to solve our problem given the information we have. Here is an example
Denavit-Hartenberg Notation
X(i -1) !( i 1)
!i
IDEA: Each joint is assigned a coordinate frame. Using the DenavitHartenberg notation, you need 4 parameters to describe how a frame (i) relates to a previous frame ( i -1 ). THE PARAMETERS/VARIABLES:
!, a , d, !
The Parameters
Yi
Zi Xi ai !
X(i -1) !( i 1)
You can align the two axis just using the 4 parameters
1) a(i-1)
Technical Definition: a(i-1) is the length of the perpendicular between the joint axes. The joint axes is the axes around which revolution takes place which are the Z(i-1) and Z(i) axes. These two axes can be viewed as lines in space. The common perpendicular is the shortest line between the two axis-lines and is perpendicular to both axis-lines.
a(i-1) cont...
Visual Approach - A way to visualize the link parameter a(i-1) is to imagine an expanding cylinder whose axis is the Z(i-1) axis - when the cylinder just touches the joint axis i the radius of the cylinder is equal to a(i-1). (Manipulator Kinematics) Its Usually on the Diagram Approach - If the diagram already specifies the various coordinate frames, then the common perpendicular is usually the X(i-1) axis. So a(i-1) is just the displacement along the X(i-1) to move from the (i-1) frame to the i frame. If the link is prismatic, then a(i-1) is a variable, not a parameter.
Z(i - 1) Y(i -1) X(i -1) !( i 1)
Yi a(i - 1 ) di
Zi Xi ai !
i
2) !(i-1) Technical Definition: Amount of rotation around the common perpendicular so that the joint axes are parallel. i.e. How much you have to rotate around the X(i-1) axis so that the Z(i-1) is pointing in the same direction as the Zi axis. Positive rotation follows the right hand rule.
3) d(i-1)
Technical Definition: The displacement along the Zi axis needed to align the a(i-1) common perpendicular to the ai common perpendicular. In other words, displacement along the Zi to align the X(i-1) and Xi axes.
Yi Z i a(i - 1 ) di Xi ai !
i
4) !i Amount of rotation around the Zi axis needed to align the X(i-1) axis with the Xi axis.
Just like the Homogeneous Matrix, the Denavit-Hartenberg Matrix is a transformation matrix from one coordinate frame to the next. Using a series of D-H Matrix multiplications and the D-H Parameter table, the final result is a transformation matrix from some frame to your initial frame.
Z(i 1)
Y(i
-1)
Y Z a(i 1) i i
X(i !(
i - 1) -1)
d
i
X a
i i
!
i
3 Revolute Joints
Z0 Z1
Y2
X2 X0 Y0 Y1 X1
d2
a0 Notice that the table has two uses: 1) To describe the robot with its variables and parameters.
a1
i 0 1 2
2) To describe some state of the robot by having a numerical values for the variables.
Y2 Z0 Z1 X2 X0 Y0 Y1 X1
i 0
(i-1) 0 0 -90
a(i-1) 0 a0 a1
di 0 0 d2
i 0 1 2
d2
1 2
a0
a1
X 0 Y0 Z 0
V X 2 Y2 V =T Z V 2 1
i 0 1 2
(i-1) 0 0 -90
a(i-1) 0 a0 a1
di 0 0 d2
i 0 1 2
0 0 0 0 1 0 0 1
cos1 sin 1 0 T = 1 0 0
sin1 cos1 0 0
0 a 0 0 0 0 0 0 1
cos 2 0 1 2T = sin 2 0
sin 2 0 cos 2 0
0 a1 1 d 2 0 0 0 1
This is a translation by a1 and then d2 followed by a rotation around the X2 and Z2 axis