Section 4 Forward Kinematics
Section 4 Forward Kinematics
Section 4 Forward Kinematics
AR501
Robot Kinematics Dynamics and Control
Forward Kinematics
4
Content:
Figure 4.1: Forward kinematics of a 3R planar open chain. For each frame, the 𝑥" and
𝑦" -axis is shown, the 𝑧̂ -axes are parallel and out of the page.
The Cartesian position (x, y) and orientation ∅ of the end-effector frame as functions
of the joint angles (𝜃1, 𝜃2, 𝜃3) are then given by
T04 = T01T12T23T34
where
Observe that T34 is constant and that each remaining T 𝑖 −1,i depends only on the
joint variable 𝜃𝑖 . As an alternative to this approach, let us define M to be the
position and orientation of frame {4} when all joint angles are set to zero.
consider each revolute joint axis to be a zero-pitch screw axis. If 𝜃1 and 𝜃2 are held at
their zero position, then the screw axis corresponding to rotating about joint 3 can be
expressed in the {0} frame as
by simple visual inspection of 𝐹𝑖𝑔𝑢𝑟𝑒 4.1. When the arm is stretched out straight to the
right at its zero configuration, imagine a turntable rotating with an angular velocity of
𝜔! = 1 rad/s about the axis of joint 3. The linear velocity 𝜗! of the point on the
turntable at the origin of {0} is in the − 𝑦 ! 0 -direction at a rate of L1 +L2 units/s.
Algebraically, 𝜗3 = − 𝜔! × 𝑞! , where 𝑞! is any point on the axis of joint 3 expressed in
{0}, e.g., 𝑞! = (L1 + L2, 0, 0).
The screw axis S3 can be expressed in se(3) matrix form as
for 𝜃1 = 0 and any fixed (but arbitrary) 𝜃3, rotation about joint 2 can be viewed as
applying a screw motion to the rigid (link 2)/(link 3) pair, i.e.,
2 3
0 1 0 0
Thus, the forward kinematics can be
6 1 0 0 0 7
[S1 ] = 6 7. expressed as a product
(4.11) of matrix
4 0 0 0 0 5 exponentials, each corresponding to a screw
0 0 0 0 motion. Note that this latter derivation of
the forward kinematics does not use any
nematics can be expressed as a productlink reference
of matrix frames; only {0} and M must
exponen-
ding to a screw motion. Note that thisbelatter
defined.
derivation of
ics does not use any link reference frames; only {0} and M
4.1 PRODUCT OF EXPONENTIALS FORMULA
4.1 PRODUCT OF EXPONENTIALS FORMULA
To use the PoE formula, it is only necessary to assign a stationary frame {s} and a
frame {b} at the end-effector, described by M (zero position matrix). It is common to
define a frame at each link, though, typically at the joint axis, these are needed for
the D–H representation and they are useful for displaying a graphic rendering of a
geometric model of the robot and for defining the mass properties of the link, Thus
when we are defining the kinematics of an n-joint robot, we may either
• minimally use the frames {s} and {b} if we are only interested in the kinematics,
• Refer to {s} as frame {0}, use frames {𝑖} for 𝑖 = 1, . . . ,n (the frames for links 𝑖
at joints 𝑖), and use one more frame {n+1} (corresponding to {b}) at the end-
effector. The frame {n + 1} (i.e., {b}) is fixed relative to {n}, but it is at a more
convenient location to represent the configuration of the end-effector. In some
cases we dispense with frame {n+1} and simply refer to {n} as the end-effector
frame {b}.
4.1 PRODUCT OF EXPONENTIALS FORMULA
4.1.1 FIRST FORMULATION: SCREW AXES IN THE BASE FRAME
Figure 4.2: Illustration of the PoE formula for an n-link spatial open chain
4.1 PRODUCT OF EXPONENTIALS FORMULA
4.1.1 FIRST FORMULATION: SCREW AXES IN THE BASE FRAME
Figure 4.2, consisting of n 1-DOF joints that are connected serially. To apply the PoE
formula,
• choose a fixed base frame {s} and an end-effector frame {b} attached to the last
link.
• Place the robot in its zero position by setting all joint values to zero, with the direction
of positive displacement (rotation for revolute joints, translation for prismatic joints)
for each joint specified.
• M ∈ SE(3) denote the configuration of the end-effector frame relative to the fixed
base frame when the robot is in its zero position.
Now suppose that joint n is displaced to some joint value 𝜃n. The end-effector frame M
then undergoes a displacement of the form
If we assume that joint (n−1) is also allowed to vary then this has the effect of
applying a screw motion to link (n−1). The end-effector frame thus undergoes a
displacement of the form
Continuing with this reasoning and now allowing all the joints (𝜃1, . . . , 𝜃n) to vary, it
follows that
(a)
(space form of the product of exponentials formula)
to calculate the forward kinematics of an open chain using the space form of the PoE
formula (a), we need the following elements:
• The end-effector configuration M∈SE(3) when the robot is at its home position,
• The screw axes S1, . . . , Sn expressed in the fixed base frame, corresponding to the
joint motions when the robot is at its home position.
where M∈SE(3) is the end-effector frame configuration when the robot is in its zero
position. By inspection M can be obtained as
The screw axis S1=(𝜔1,𝜗1) for joint axis 1 is then given by 𝜔1 =(0,0,1) and 𝜗1 =(0,0,0)
To determine the screw axis S2 for joint axis 2, observe that joint axis 2 points in the
-𝑦" 0-direction, so that 𝜔2=(0,-1,0). Choose q2=(L1,0,0), in which case 𝜗2 =- 𝜔2, q2=(0,
0,-L1). Finally, to determine the screw axis S3 for joint axis 3, note that 𝜔3=(1,0,0).
Choosing q3=(0,0,-L2), it follows that 𝜗3=- 𝜔3 q3=(0,-L2,0).
4.1 PRODUCT OF EXPONENTIALS FORMULA
4.1.2 EXAMPLES
we have the following 4×4 matrix representations for the three joint screw axes S1,
S2,and S3:
It will be more convenient to list the screw axes in the following tabular form:
4.1 PRODUCT OF EXPONENTIALS FORMULA
4.1.2 EXAMPLES
Example 4.2 (3R planar open chain). For the robot in Figure 4.1, we expressed the
end-effector home configuration M and the screw axes Si as follows:
In this case, the forward kinematics would use the simplified matrix exponential for
planar motions.
Figure: 4.1
4.1 PRODUCT OF EXPONENTIALS FORMULA
4.1.2 EXAMPLES
Example 4.3 (6R spatial open chain). We now derive the forward kinematics of the
6R open chain of Figure 4.4. 6-DOF arms play an important role in robotics because
they have the minimum number of joints that allows the end-effector to move a rigid
body in all its degrees of freedom, subject only to limits on the robot's workspace. For
this reason, 6-DOF robot arms are sometimes called general purpose manipulators.
The zero position and the direction of positive rotation for each joint axis are as
shown in the figure. A fixed frame {s} and end-effector frame {b} are also assigned
as shown. The end-effector frame M in the zero position is then
4.1 PRODUCT OF EXPONENTIALS FORMULA
4.1.2 EXAMPLES
Example 4.4 (An RRPRRR spatial open chain). In this example we consider the 6-
degree-of-freedom RRPRRR spatial open chain of Figure 4.5. The end-effector frame
in the zero position is given by
The screw axes 𝑆" = (𝜔" , 𝜗" ) are listed in the
following table
Note that the third joint is prismatic, so that 𝜔! = 0 and 𝜗! is a unit vector in the
direction of positive translation.
4.1 PRODUCT OF EXPONENTIALS FORMULA
4.1.3 Second Formulation: Screw Axes in the End-Effector Frame
# "# $# "# $#
The matrix identity 𝑒 = 𝑀%& 𝑒 $ M
can also be expressed as M𝑒 # = 𝑒$M .
M
Beginning with the rightmost term of the previously derived product of exponentials
formula, if we repeatedly apply this identity then after n iterations, we obtain
------------(b)
where each [𝛽" ] is given by 𝑀%& [𝑆" ]M, i.e., 𝛽 i =[Ad 𝑀%& ] 𝑆" , i = 1,…..,n. Equation (b) is
an alternative form of the product of exponentials formula, representing the joint axes
as screw axes 𝛽" in the end-effector (body) frame when the robot is at its zero position.
We call Equation (b) the body form of the product of exponentials formula.
4.2 the universal robot description format
4.2 The universal robot description format
The Universal Robot Description Format (URDF) is an XML (eXtensible Markup Language)
file format used by the Robot Operating System (ROS) to describe the kinematics, inertial
properties, and link geometry of robots. A URDF le describes the joints and links of a
robot:
Joints. Joints connect two links: a parent link and a child link. A few of the possible joint
types include prismatic, revolute, continuous, and fixed. Each joint has an origin frame
that defines the position and orientation of the child link frame relative to the parent link
frame when the joint variable is zero. The origin is on the joint's axis. Each joint has an
axis 3-vector, a unit vector expressed in the child link's frame, in the direction of positive
rotation for a revolute joint or positive translation for a prismatic joint.
Links. While the joints fully describe the kinematics of a robot, the links define its mass
properties. These start to be needed in Chapter 8, when we begin to study the dynamics
of robots. The elements of a link include its mass, an origin frame that defines the
position and orientation of a frame at the link's center of mass relative to the link's joint
frame described above, and an inertia matrix, relative to the link's center of mass frame,
specified by the six elements on or above the diagonal.
4.2 the universal robot description format
A URDF le can represent any robot with a tree structure. This includes serial-chain
robot arms and robot hands, but not a Stewart platform or other mechanisms with
closed loops. An example of a robot with a tree structure is shown in Figure 4.10.
The orientation of a frame {b} relative to a frame fag is represented using Roll, Pitch,
yaw coordinates: first, a roll about the fixed 𝑥" a-axis, then a pitch about the fixed 𝑦" a-
axis, then a yaw about the fixed 𝑧̂ a-axis.
4.2 the universal robot description format
where Ti,i𝑇"%&,"
where 1 ∈ 2SE(3)
SE(3) denotes
denotes the relative
the relative displacement
displacement between linkbetween
frames {𝑖 link frames
− 1} and
i {𝑖}. and {i}. on
1}Depending Depending
how the linkon how the
reference link have
frames reference frameseach
been chosen, have been
𝑇"%&," can chosen,
be
achobtained
Ti 1,i incan a straightforward
be obtained fashion.
in a straightforward fashion.
The Denavit-Hartenberg convention
C.1. Assigning Link Frames
The first rule is that the 𝑧̂! -axis coincides with joint axis 𝑖 and the
𝑧̂!"# -axis coincides with joint axis 𝑖 − 1.
axis i 1
axis i
Determines the origin of the link reference frame: First, find the line
segment that orthogonally intersects both the joint axes
𝑧̂!"# and 𝑧̂! .
We now consider the cases where the mutually perpendicular line is undefined or fails to
be unique, or where some of the joints are prismatic; finally, we consider how to choose
the ground and end-effector frames.
1. When Adjacent Revolute Joint Axes Intersect: If two adjacent revolute
joint axes intersect each other then a mutually perpendicular line between 586 C.1. Assigning Link Fr
the joint axes fails to exist. In this case the link length is set to zero, and we
axis i 1
choose 𝑥!!"# to be perpendicular to the plane spanned by 𝑧!"# ̂ and 𝑧!̂ . There axis i
are two possibilities, both of which are acceptable: one leads to a positive
value of the twist angle 𝛼!"# while the other leads to a negative value.
2. When Adjacent Revolute Joint Axes Are Parallel: The second special case ↵i
ẑi
1 ŷi x̂i di
occurs when two adjacent revolute joint axes are parallel. In this case there
ẑi 1 i
ŷi
exist many possibilities for a mutually perpendicular line, all of which are 1
x̂i
ai 1
valid A useful guide is to try to choose the mutually perpendicular line that
is the most physically intuitive and that results in as many zero parameters
as possible. Figure C.1: Illustration of the Denavit–Hartenberg parameters.
Prismatic Joints
For prismatic joints, the ẑ-direction of the link reference frame is chosen to
Once
rm all the transformations
transformations T between T i
adjacent 1,i T=iframes
between
link 6 sin
1,i =arei cos
Rot(x̂,
adjacent known
↵i link
1↵i cos
in
i cos ↵are
)Trans(x̂,
1frames i 1ai known sin ↵i in
1 )Trans(ẑ,1 did)Rot(ẑ,
i sin ↵i 1 i )
7,
The Denavit-Hartenberg convention sin i 2
i 1,i 4 sin ↵i 1 cos i sin ↵i 1 cos ↵i 1 di cos ↵i 1 5
terms
ir =D–H
of their
parameters,
Rot(x̂,
D–H theparameters,
↵i 1 )Trans(x̂, forward kinematics
ai 1 )Trans(ẑ,
the forward
di )Rot(ẑ,is obtained kinematics
by0 sequen- cos is obtained
i bysin sequen-
0i 01
i) 0
Once
tially
lying all link
2these the transformations
multiplying these
transformations. link !"#,! between
𝑇transformations.
Each link frame adjacent Each 6
transformationlinksin frames
link iscos are
3 iframe known in terms of
↵i transformation
1 cos i cos ↵i is
theirsinD–H ↵i 1 d
cos sin 0 = a 6 1
of parameters, the forward kinematics is obtained by isequentially multiplying these link
i i 1
the form
6 sin i cos ↵i 1Each where 4 sin 7 i sin ↵ i 1 cos i sin ↵ i 1 cos ↵i 1 di
transformations. cos link cos ↵
frame sin ↵
transformation d issin
of ↵ the form 2 3
= 6 i i 1 i 1 i i 1 7,
4 sin i sin ↵i 1 cos i sin ↵i 1
Rot(x̂, ↵i 1 )Trans(x̂, ai 1 )Trans(ẑ, di )Rot(ẑ, cos ↵i 1 ) di cos ↵i 1 5 0 1 0 0 0 0 0
i
2Ti 1,i =0 Rot(x̂, ↵i 10)Trans(x̂, ai0 1 )Trans(ẑ, 1 di )Rot(ẑ,
3 6 6 0i ) cos ↵i 1 sin ↵i 1 0 7 7,
cos i 2 sin i 0where Rot(x̂, ai ↵1i 1 ) = 4 0 sin ↵i 1 cos ↵ 3 0 5
(C.2
6 sin i cos ↵i 1 cos cos sin 0 a2i 1 i 1
cos ii 1
↵ sin ↵ i di sin ↵i 1 7
0 0 0 1
3
6 i i 1 7 1↵ 3 7 0 0 0
4 sin i sin ↵i 6 sin
cos 2 cos
sin ↵ ↵ cos
cos ↵ cos ↵
d 3
cos ↵ sin 5 ↵, 2 d sin
= 6 4
1 ii1 i
i0 1 1 i
i0 1 0i
i 1 i 1 i 1
1 0
i
0 6
6 a0i
i
1
1
cos 7
↵
5 i,1 sin ↵ i 1 0 7
7
0 sin6 i0sin 0 cos↵i↵i 11 cos 0 ↵i sin ↵0i 711 Rot(x̂,
sin cos ↵ ↵
i 1
6 ) d
= i cos ↵ i 17
6 0 1 04 00 sin 0 5
i 1
Rot(x̂, ↵i 1 ) = 6 i 1
Trans(x̂, 7 , a ) (C.2) = 7 ,↵i 1 cos ↵i 1 (C.3
4 0 0 sin ↵i 1 cos ↵i 01 0 5 i 1 0 4 0 0 11 0 5
0 0 0 1
2 0 0 0 13 0 0 02 1 3
where 2
1 0 3 0 0 2 1 30 0 ai 1
1 0 0 a i 1 1 0 306 0
6 6
6 0 cos ↵ i 1 2sin
7 ↵ i 1 0 7
7 6 0 7 1 0 0 7
Rot(x̂, ↵i a1 ) )= =4 6 0 1 0 0 7 1 0 5 , Trans(x̂, (C.2)
0 a 6 0 0=
) 1 0 0 76 7,
Trans(x̂, i 1 ,
0 0 sin0↵i1 1 0cos5↵i 1 0Trans(ẑ, di ) = 4
4 (C.3) i 1 4 0i 50, 1 0 5 (C.4
0 0 00 0 6 00 cos 1↵i 1
0
sin ↵i 1 0 7 0 0 0 0 71 d
Rot(x̂, ↵
2 2 i 1 ) = 1 63 0 0 0 , 1 (C.2) 1
4 0 52 33
1 10 0 0 0 ai 01 3 0 sin ↵i 1 cos ↵i 2 1
cos i 1 1 sin0 i 01 00 0
6 6
6 0 01 1 0 0 00 77 0 7 0 0 6 sin1 6 cos
0 1 0 00 7
0 7
Trans(x̂, a ) =
Trans(ẑ, di ) =4 4
i 1 6 2
7 ,
0 00 0 1 1 0di 55, 1 0 0 Rot(ẑ, 3 (C.3)
i ) (C.4)
Trans(ẑ, = 4 6
di ) =
i 1 6 i 1 7 ,7 . (C.5
ai 1 0 4 0 00 1 d 1i 5 0 5
0 00 0 0 0 11 6
36 0 1 0 3 0 7
0 0 00 0 01 1
2 2 7,
Trans(x̂,1 acos i0 1 )0 =0 4 0i 1 0 1
sin 0 0 5 2 (C.3) 3
6 6
i 1
7 2017 preprint of Modern
May
0
7 Robotics, Lynch and Park, Cambridge cosU. Press,
i 1 2017. sin i 1 0 0
http://modernrobotics.or
The Denavit-Hartenberg convention
C.1. Assigning LinkAFrames
useful way to visualize 𝑇!"#,! is that it transports
frame {𝑖 − 1} to frame {𝑖} via the following
axis i 1
axis i
sequence of four transformations:
(a) A rotation of frame {𝑖 − 1} about its 𝑥* -axis by an
angle 𝛼!"# .
(b) A translation of this new frame along its 𝑥* -axis by
a distance 𝑎!"# .
ẑi
(c) A translation of the new frame formed by (b)
↵i 1 ŷi x̂i di
along its 𝑧̂ -axis by a distance 𝑑! .
ŷi
ẑi 1
ai
i (d) A rotation of the new frame formed by (c) about
1 1
x̂i 1
its ˆz-axis by an angle ∅! .
i ↵i 1 ai 1 di i
1 0 0 0 ✓1
2 90 L1 0 ✓2 90
3 90 L2 0 ✓3
Since each row and column of 𝑅#" must have unit length, 𝑟$" = 0 implies that
assumption (DH2) means that the displacement between 𝑂# and 𝑂" can be expressed
as a linear combination of the vectors 𝑍# and 𝑋" . This can be written as
The Denavit-Hartenberg convention
we see that four parameters are enough to specify any homogeneous transformation that
satisfies the constraints (DH1) and (DH2). physical interpretation to each of the four
quantities in eq(1).
• The parameter ‘a’ is the distance between the axes 𝑍# and 𝑍" and is measured along the
axis 𝑋" .
• The angle 𝛼 is the angle between the axes 𝑍# and 𝑍" , measured in a plane normal to
𝑋" .The positive sense for is determined from 𝑍# to 𝑍" by the right-handed rule.
• The Parameter d is the perpendicular distance from the origin 𝑂# to the intersection of
the 𝑋" axis with 𝑍# measured along the 𝑍# axis.
• 𝜃 is the angle between 𝑋# and 𝑋" measured in a plane normal to 𝑍# .
These physical interpretations will prove useful in developing a procedure for assigning
coordinate frames that satisfy the constraints (DH1) and (DH2), and we now turn our
attention to developing such a procedure.
SUMMARY
• An open chain with a fixed reference frame {s} and a reference frame {b} attached to
some point on its last link – this frame is denoted the end-effector frame – the forward
kinematics is the mapping T(𝜃) from the joint values 𝜃 to the position and orientation of
{b} in {s}.
• In the D–H representation the forward kinematics of an open chain is described in terms
of the relative displacements between reference frames attached to each link. If the link
frames are sequentially labeled {0}, . . . , {n + 1}, where {0} is the fixed frame {s},
{i} is a frame attached to link i at joint i (with i = 1, . . . ,n), and {n + 1} is the end-
effector frame {b} then the forward kinematics is expressed as
𝑇#,&'" 𝜃 = 𝑇#" 𝜃" … … … … … . 𝑇&(",& 𝜃& 𝑇&,&'"
𝜃! = joint i variable
𝑇&,&'" = indicates the (fixed) configuration of the end-effector frame in {n}.
If the end-effector frame {b} is chosen to be coincident with {n} then we can dispense
with the frame {n + 1}.
• The D–H convention requires that reference frames assigned to each link obey a strict
convention. Following this convention, the link frame transformation 𝑇!(" , 𝑖 between link
frames { 𝑖 −1} and { 𝑖 } can be parametrized using only four parameters, the D–H
parameters. Three of these parameters describe the kinematic structure, while the
fourth is the joint value. Four numbers is the minimum needed to represent the
displacement between two link frames.
• The forward kinematics can also be expressed as the following product of exponentials
(the space form),
T 𝜃 = 𝑒 [*#],# … … … … … … 𝑒 [*$ ],$ 𝑀
where 𝑆! =(𝜔! ,𝜗! ) denotes the screw axis associated with positive motion along joint 𝑖
expressed in fixed-frame {s} coordinates, 𝜃! is the joint- 𝑖 variable, and M ∈ 𝑆𝐸 3
denotes the position and orientation of the end-effector frame {b} when the robot is in
its zero position. It is not necessary to define individual link frames; it is only necessary
to define M and the screw axes 𝑆" … … … … . . 𝑆& .
• The product of exponentials formula can also be written in the equivalent body form,
T 𝜃 = 𝑀𝑒 [-#],# … … … … … … 𝑒 [-$ ],$
where 𝐵! = 𝐴𝑑.(" 𝑆! , 𝑖 = 1, … … . , 𝑛; 𝐵! = (𝜔! ,𝜗! ) is the screw axis corresponding to joint
axis 𝑖, expressed in {b}, with the robot in its zero position.
• The Universal Robot Description Format (URDF) is a file format used by the Robot
Operating System and other software for representing the Kinematics, inertial
properties, visual properties, and other information for general tree-like robot
mechanisms, including serial chains. A URDF file includes descriptions of joints, which
connect a parent link and a child link and fully specify the kinematics of the robot, as
well as descriptions of links, which specify its inertial properties.