Forward kinematics
Forward kinematics determines the pose of a robot or one of its intermediate frames from the values of its joint variables.
For a serial manipulator, the joint variables are collected in the configuration vector
The notation and transformation rules used in this section follow the conventions established in Mathematical notation and conventions, Rotations, Homogeneous transformations, and Denavit–Hartenberg convention.
Robot configuration
The configuration of an \(n\)-joint serial manipulator is described by
where \(\mathcal Q\) denotes the robot’s configuration space.
Each coordinate \(q_i\) represents the variable associated with joint \(i\).
For a revolute joint,
while for a prismatic joint,
Therefore,
The configuration space contains the admissible joint configurations of the robot.
When joint limits are present, they restrict the allowed values of the corresponding coordinates. For example,
The vector \(\vec q\) describes the internal configuration of the manipulator. It should not be confused with the pose of the end effector.
Different joint configurations may, in general, produce the same end-effector pose.
Forward kinematic map
The complete forward kinematics of a serial manipulator may be represented as a map
such that
The transformation
describes the pose of the terminal frame \(\{n\}\) with respect to the base frame \(\{0\}\).
It has the form
Thus, the forward kinematic map contains both:
the orientation $\( R_n^0(\vec q), \)$
and the position $\( \vec r_{O_n}^{\,0}(\vec q). \)$
Position and pose kinematics
In some applications, the complete pose is required:
In other applications, only the position of the terminal point is relevant.
The positional component of the forward kinematics may therefore be written as
with
Similarly, the orientation component can be regarded as
with
These maps are different components of the same forward kinematic model.
Note
id=”k3x8hq” A robot may have multiple configurations that produce the same position or pose. This non-uniqueness becomes especially important in inverse kinematics.
Serial kinematic chains
For a serial manipulator, each pair of consecutive reference frames is related by a homogeneous transformation
The pose of frame \(\{i\}\) with respect to the base is obtained by composing all previous transformations:
For the terminal frame,
When classic Denavit–Hartenberg parameters are used,
with
For a rigid serial manipulator, one of \(d_i\) or \(\theta_i\) depends on the joint variable \(q_i\), depending on whether the joint is prismatic or revolute.
Thus, the forward kinematic process can be summarized as
Intermediate frames
Forward kinematics is not limited to the terminal frame.
For any intermediate frame \(\{i\}\),
The corresponding orientation is
and the position of its origin is
Therefore,
Intermediate transformations are useful for describing the pose of individual links and for later calculations involving velocities, Jacobians, centers of mass, and dynamics.
Points attached to a link
Let \(P\) be a point rigidly attached to link \(i\).
Suppose its local position is known in frame \(\{i\}\):
Its homogeneous representation is
The position of \(P\) with respect to the base frame is then
Equivalently, in Cartesian form,
This relation allows the forward kinematic model to determine the position of arbitrary points attached to the robot, not only reference-frame origins.
Examples include:
points located along a link,
centers of mass,
tool points,
geometric points used for visualization or analysis.
Terminal and tool frames
The terminal DH frame \(\{n\}\) does not necessarily coincide with the physical tool or end-effector frame.
If a separate tool frame \(\{E\}\) is defined through a constant transformation
then its pose with respect to the robot base is
Likewise, if the robot base is itself located with respect to an external world frame \(\{W\}\),
may be used to obtain
This separation allows the robot’s internal kinematic model to remain independent of application-specific base and tool offsets.
Revolute and prismatic joints
The mathematical structure of the forward kinematic chain is the same for revolute and prismatic joints.
The difference lies in which parameter varies with configuration.
For a revolute joint,
and the relative transformation depends on \(q_i\) through a rotation.
For a prismatic joint,
and the relative transformation depends on \(q_i\) through a translation.
Thus, both joint types can be incorporated into the same product
Forward kinematics in Moro
Moro’s Robot class provides direct access to the main quantities involved in forward kinematics.
The most important relationships are:
Mathematical quantity |
Moro |
|---|---|
DH parameters |
|
DH table |
|
Joint variables |
|
Joint variable \(q_i\) |
|
Number of degrees of freedom |
|
Joint types |
|
\(T_i^0\) |
|
\(T_n^0\) |
|
\(R_i^0\) |
|
\(\vec r_{O_i}^{\,0}\) |
|
Direction of \(z_i\) expressed in \(\{0\}\) |
|
The transformation
corresponds directly to
robot.T_i0(i)
while the pose of the terminal frame is available through
robot.T
The orientation and origin position of an intermediate frame can be obtained using
robot.R_i0(i)
robot.r_o(i)
respectively.
The internal transformations between consecutive frames are used by Moro to construct the complete kinematic chain, but implementation details such as private internal caches are not part of the public mathematical interface.
Note
id=”xj7qwf”
This section introduces the mathematical role of the main Robot properties and methods. Complete signatures, validation rules, and return types belong to the API reference.
Example: planar 2R manipulator
Consider again the planar two-link manipulator with revolute joint variables
and link lengths \(a_1\) and \(a_2\).
Using the classic DH convention,
\(i\) |
\(a_i\) |
\(\alpha_i\) |
\(d_i\) |
\(\theta_i\) |
|---|---|---|---|---|
1 |
\(a_1\) |
\(0\) |
\(0\) |
\(q_1\) |
2 |
\(a_2\) |
\(0\) |
\(0\) |
\(q_2\) |
The first relative transformation is
The second is
The terminal pose is
After multiplication,
The position of the terminal origin is therefore
Its orientation is
Because this is a planar manipulator, the terminal orientation can also be represented by the scalar angle
Thus, the planar forward kinematic map may be written as
with
and
The same model in Moro
A symbolic planar 2R robot can be created using the same DH parameters:
from sympy import symbols
from moro import Robot
a1, a2 = symbols("a1 a2")
q1, q2 = symbols("q1 q2")
robot = Robot(
(a1, 0, 0, q1, "r"),
(a2, 0, 0, q2, "r"),
)
The complete forward kinematics is then available through
robot.T
while the pose of an intermediate frame can be obtained using
robot.T_i0(1)
and its position and orientation using
robot.r_o(1)
robot.R_i0(1)
The same mathematical relationships derived above are therefore available directly through Moro’s kinematic interface.
Forward versus inverse kinematics
Forward kinematics starts with the robot configuration
and computes a pose or position:
Inverse kinematics asks the opposite question:
or, for a position-only problem,
Unlike forward kinematics, which produces a deterministic pose for a given configuration, inverse kinematics may have:
no solution,
one solution,
several solutions,
or infinitely many solutions.
The inverse problem is discussed separately in the corresponding theory section.
Summary
The main forward-kinematics conventions used throughout Moro are:
Concept |
Convention |
|---|---|
Robot configuration |
\(\vec q=[q_1,\ldots,q_n]^T\) |
Configuration space |
\(\vec q\in\mathcal Q\) |
Full forward kinematics |
\(T_n^0=f(\vec q)\) |
Position kinematics |
\(\vec r_{O_n}^{\,0}=f_p(\vec q)\) |
Orientation kinematics |
\(R_n^0=f_R(\vec q)\) |
Intermediate-frame pose |
\(T_i^0=T_1^0\cdots T_i^{i-1}\) |
Terminal-frame pose |
\(T_n^0=T_1^0\cdots T_n^{n-1}\) |
Point attached to link \(i\) |
\(\tilde r_P^0=T_i^0\tilde r_P^i\) |
Tool frame |
\(T_E^0=T_n^0T_E^n\) |
Revolute coordinate |
\(q_i=\theta_i\) |
Prismatic coordinate |
\(q_i=d_i\) |
Moro terminal pose |
|
Moro intermediate pose |
|
Moro frame orientation |
|
Moro frame-origin position |
|
Forward kinematics provides the geometric foundation for differential kinematics, Jacobian analysis, inverse kinematics, and robot dynamics.