Unit 4: Forward Kinematics
I. Orientation
Forward kinematics determines the position and orientation of a robot’s end-effector from known joint variables and fixed geometric dimensions. For a planar articulated robot, motion is confined to one plane and the required position is obtained by composing the rotations and translations produced by successive links. In this laboratory, the focus is a two-axis planar configuration implemented with the Orangewood Robotic Arm, analyzed both geometrically and through Denavit-Hartenberg parameters.
- Governing principle: The end-effector pose is obtained by multiplying transformations from the base frame to the tool frame.
- Joint convention: A revolute joint variable is represented by an angle, usually measured in degrees for the arm interface and converted to radians for calculation.
- Planar assumption: Both links move in the same (x)-(y) plane; there is no displacement along (z) and no rotation about (x) or (y).
- Link dimensions: (L_1) is the length of link 1 and (L_2) is the length of link 2, measured between joint axes or effective pivot points.
- Joint variables: (\theta_1) is the base-joint angle and (\theta_2) is the relative angle at the second joint.
- Reference frame: The base frame is fixed at joint 1, with the (x)-axis along the zero-position direction and the (y)-axis perpendicular to it in the plane.
- Pose representation: For a planar arm, the end-effector position is ((x,y)), while its in-plane orientation is (\phi).
- Idealization: Joint backlash, servo offsets, link flexibility, friction, and manufacturing tolerances are initially neglected.
II. Two-Axis Planar Articulated Robot — Mechanism and Coordinate Model
A two-axis planar articulated robot consists of two rigid links connected by two revolute joints. Its structure is commonly called a two-link serial manipulator or a planar (2R) robot, where (R) denotes a revolute joint.
A. Forward kinematics of two-axis planar articulated robot
The forward-kinematic model maps the joint configuration ((\theta_1,\theta_2)) to the Cartesian position and orientation of the second link or end-effector.
- Joint arrangement: Joint 1 rotates link 1 relative to the fixed base; joint 2 rotates link 2 relative to link 1.
- Absolute link orientations: Link 1 has orientation (\theta_1), while link 2 has absolute orientation
[
\phi=\theta_1+\theta_2.
]
The second angle is added because (\theta_2) is normally measured relative to link 1. - Degrees of freedom: The robot has two independent variables, (\theta_1) and (\theta_2), allowing its tip to reach points in a two-dimensional workspace.
- Position variables: (x) is horizontal displacement from the base and (y) is vertical displacement from the base, both measured in the same unit as (L_1) and (L_2).
- Workspace boundary: The maximum radial reach is (L_1+L_2), while the minimum theoretical radial reach is (\lvert L_1-L_2\rvert). Real servo limits reduce this region.
B. Geometric assumptions and sign convention
A consistent angle convention is essential because an incorrect sign or reference direction changes the predicted tip position.
- Counterclockwise positive: Positive (\theta_1) and (\theta_2) are taken counterclockwise when viewed perpendicular to the plane.
- Relative second angle: If link 2 is aligned with link 1, then (\theta_2=0), even though link 2 has absolute orientation (\theta_1).
- Planar coordinates: The base is placed at ((0,0)); positive (x) points right and positive (y) points upward in the chosen drawing.
- Angle conversion: Trigonometric functions in most programming languages use radians:
TEXTtheta_rad = theta_deg * pi / 180
Here,theta_degis the servo angle in degrees,theta_radis the computational angle in radians, and (\pi\approx3.14159).
C. Applications and limitations
The model is useful for predicting where the Orangewood arm will place its tip, but it is an ideal geometric description rather than a complete physical model.
- Applications: It supports workspace plotting, target-position prediction, servo calibration, trajectory generation, and checking whether measured motion agrees with theory.
- Position limitation: Forward kinematics predicts a pose for given angles; it does not calculate the angles required for a desired point. That reverse problem is inverse kinematics.
- Mechanical limitation: A commanded servo angle may differ from the actual joint angle because of horn mounting, zero-offset error, backlash, and limited angular travel.
- Measurement limitation: The effective link length must be measured from the actual axes of rotation. Measuring only the visible plastic length can introduce systematic position error.
III. Analytical Algorithm — Direct Geometric Derivation
The analytical algorithm derives the end-effector coordinates by resolving each link into horizontal and vertical components. It is the simplest method for a two-axis planar arm and provides formulas that are easy to implement and verify.
A. Forward kinematics of two-axis planar articulated robot using analytical and DH algorithms with Orangewood Robotic Arm
The analytical method expresses the tip coordinates directly as sums of link projections.
- First-link endpoint: The position of joint 2, denoted ((x_1,y_1)), is
TEXTx1 = L1 * cos(theta1) y1 = L1 * sin(theta1)
Here, (L_1) is link 1 length, (\theta_1) is the first joint angle, and ((x_1,y_1)) is the location of the second joint. - Second-link projection: Link 2 contributes (L_2\cos(\theta_1+\theta_2)) in the (x)-direction and (L_2\sin(\theta_1+\theta_2)) in the (y)-direction.
- End-effector position: Adding the two link contributions gives
TEXTx = L1 * cos(theta1) + L2 * cos(theta1 + theta2) y = L1 * sin(theta1) + L2 * sin(theta1 + theta2)
Here, ((x,y)) is the predicted tip position. - Orientation: The end-effector orientation in the plane is
TEXTphi = theta1 + theta2
The formula applies when the tool direction follows link 2. - Transformation interpretation: The first term places the second joint; the second term places the end-effector relative to that joint. This makes the physical meaning of each term explicit.
B. Analytical calculation and implementation
The algorithm can be implemented by converting input angles, evaluating the equations, and comparing the result with the physical arm position.
- Algorithm steps: Measure (L_1) and (L_2); read (\theta_1,\theta_2); convert angles to radians; calculate (\phi); calculate (x) and (y); report the predicted pose.
- Pseudocode:
TEXTinput L1, L2, theta1_deg, theta2_deg theta1 = theta1_deg * pi / 180 theta2 = theta2_deg * pi / 180 phi = theta1 + theta2 x = L1*cos(theta1) + L2*cos(phi) y = L1*sin(theta1) + L2*sin(phi) output x, y, phi
(L_1,L_2) are link lengths;theta1_degandtheta2_degare measured joint commands; (x,y) are Cartesian coordinates; and (\phi) is the tool orientation. - Worked example: For (L_1=100\text{ mm}), (L_2=80\text{ mm}), (\theta_1=30^\circ), and (\theta_2=45^\circ), (\phi=75^\circ). Therefore,
[
x=100\cos30^\circ+80\cos75^\circ\approx122.3\text{ mm},
]
[
y=100\sin30^\circ+80\sin75^\circ\approx127.3\text{ mm}.
] - Verification: When (\theta_1=\theta_2=0^\circ), the equations give (x=L_1+L_2) and (y=0), which matches a fully extended horizontal arm.
- Common error: Using (\cos\theta_2) and (\sin\theta_2) for the second link alone is incorrect when (\theta_2) is a relative joint angle; the correct absolute angle is (\theta_1+\theta_2).
IV. Denavit-Hartenberg Algorithm — Homogeneous Transformation Method
The DH algorithm provides a systematic frame-based procedure for serial robots. It is especially valuable when the number of joints increases, because every link is represented using the same standard transformation structure.
A. Forward kinematics of two-axis planar articulated robot using analytical and DH algorithms with Orangewood Robotic Arm
For the planar (2R) robot, standard DH parameters can be selected so that both joint axes are parallel to the (z)-axis and both links lie in the (x)-(y) plane.
- DH parameters: For joint (i), (\theta_i) is joint rotation, (d_i) is displacement along (z), (a_i) is link length along (x), and (\alpha_i) is twist between successive (z)-axes.
-
Planar parameter table:
Link (i) (\theta_i) (d_i) (a_i) (\alpha_i) 1 (\theta_1) 0 (L_1) 0 2 (\theta_2) 0 (L_2) 0 The zero values arise because the joint axes are parallel and there is no offset out of the plane.
- Elementary transformation: The standard DH matrix from frame (i-1) to frame (i) is
TEXTA_i = Rot(z, theta_i) * Trans(z, d_i) * Trans(x, a_i) * Rot(x, alpha_i)
Rotdenotes rotation andTransdenotes translation; the four parameters specify their magnitudes. - Planar matrix: With (d_i=0) and (\alpha_i=0),
TEXTA_i = [ cos(theta_i) -sin(theta_i) 0 ai*cos(theta_i) ] [ sin(theta_i) cos(theta_i) 0 ai*sin(theta_i) ] [ 0 0 1 0 ] [ 0 0 0 1 ]
B. Transformation multiplication and pose extraction
The complete forward-kinematic transformation is obtained by multiplying the individual DH matrices in joint order.
- Overall transform:
TEXTT02 = A1 * A2
(T_{02}) maps coordinates from the end-effector frame to the base frame through frames 0, 1, and 2. - Resulting matrix:
[
T_{02}=
\begin{bmatrix}
\cos(\theta_1+\theta_2)&-\sin(\theta_1+\theta_2)&0&
L_1\cos\theta_1+L_2\cos(\theta_1+\theta_2)\
\sin(\theta_1+\theta_2)&\cos(\theta_1+\theta_2)&0&
L_1\sin\theta_1+L_2\sin(\theta_1+\theta_2)\
0&0&1&0\
0&0&0&1
\end{bmatrix}.
] - Position extraction: The fourth column contains the Cartesian position:
[
x=T{02}(1,4),\qquad y=T{02}(2,4).
] - Orientation extraction: The upper-left (2\times2) rotation block represents orientation (\phi=\theta_1+\theta_2).
- Method comparison: The analytical equations and DH multiplication produce the same result for this planar arm. Analytical kinematics is shorter for two links; DH notation is more systematic and scales better to spatial manipulators.
V. Orangewood Robotic Arm — Laboratory Application and Validation
The Orangewood Robotic Arm supplies the physical mechanism on which the two-axis planar forward-kinematic model is tested. The laboratory task is to connect commanded joint angles and measured link geometry to a predicted end-effector pose.
A. Forward kinematics of two-axis planar articulated robot using analytical and DH algorithms with Orangewood Robotic Arm
The arm should be modeled using the two joints and two effective link lengths that participate in the selected planar motion.
- Hardware identification: Locate the base revolute axis, elbow revolute axis, link 1, link 2, and the chosen end-effector reference point on the Orangewood arm.
- Geometric calibration: Measure (L_1) from the base axis to the second joint axis and (L_2) from the second joint axis to the tool reference point.
- Zero configuration: Record the physical pose corresponding to the controller’s (0^\circ) settings. The mathematical zero may require an offset:
[
\theta{1,\text{model}}=\theta{1,\text{servo}}-\delta1,\qquad
\theta{2,\text{model}}=\theta_{2,\text{servo}}-\delta_2,
]
where (\delta_1,\delta_2) are experimentally determined offsets. - Safety constraints: Keep angles within the arm’s mechanical limits and avoid configurations where the links strike the base, mounting bracket, or surrounding equipment.
- Unit consistency: If measured lengths are in millimetres, the calculated (x) and (y) values are also in millimetres. Do not mix millimetres and centimetres in one calculation.
B. Experimental comparison and error sources
Validation compares the analytical and DH predictions with the actual Orangewood arm position at selected joint configurations.
- Comparison procedure: Set a joint pair such as ((30^\circ,45^\circ)), calculate ((x,y)) using both methods, and measure the physical tip location relative to the base frame.
- Position error: For measured position ((x_m,y_m)) and calculated position ((x_c,y_c)),
[
e_p=\sqrt{(x_m-x_c)^2+(y_m-y_c)^2}.
]
(e_p) is the Euclidean position error in millimetres if the coordinates are in millimetres. - Systematic errors: A constant displacement across several tests may indicate incorrect link length, base-frame placement, or servo zero offset.
- Configuration-dependent errors: Errors that change with angle can result from backlash, flexible links, inaccurate joint-axis measurement, or servo nonlinearities.
- DH-frame errors: A wrong axis direction, reversed positive rotation, or mistaken relative-angle convention changes the transformation product even when the matrix multiplication is correct.
- Interpretation: Agreement between analytical and DH results verifies the mathematical model; agreement with the physical arm additionally depends on calibration and mechanical accuracy.
- Laboratory record: A useful observation table contains (\theta_1), (\theta_2), (L_1), (L_2), analytical (x,y), DH (x,y), measured (x,y), and (e_p). This separates calculation discrepancies from hardware discrepancies.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →