Robotics Kinematics

Interactive Lecture

Forward and Inverse Kinematics for Manipulators

by Dr Arnaldo Delli Carri

Understanding Robotics Kinematics

Robotics kinematics is the study of motion in robotic systems without considering the forces that cause the motion. It forms the mathematical foundation for robot control, trajectory planning, and manipulation. Kinematics allows us to answer two fundamental questions:

Forward kinematics determines where the end-effector is located given the joint angles; inverse kinematics solves for the joint angles needed to reach a desired end-effector position and orientation.

Denavit-Hartenberg (DH) Parameters

The Denavit-Hartenberg convention provides a systematic method to describe the geometry of serial manipulators. Each link is described by four parameters that define the transformation from one joint frame to the next:

DH Parameters:

Homogeneous Transformation Matrix

The transformation from frame \(i-1\) to frame \(i\) is represented by a 4×4 homogeneous transformation matrix that combines rotation and translation:

\[{}^{i-1}T_i = \begin{bmatrix} \cos\theta_i & -\sin\theta_i\cos\alpha_i & \sin\theta_i\sin\alpha_i & a_i\cos\theta_i \\ \sin\theta_i & \cos\theta_i\cos\alpha_i & -\cos\theta_i\sin\alpha_i & a_i\sin\theta_i \\ 0 & \sin\alpha_i & \cos\alpha_i & d_i \\ 0 & 0 & 0 & 1 \end{bmatrix}\]

Forward Kinematics

Forward kinematics (FK) computes the position and orientation of the end-effector given the joint variables. For a serial manipulator with \(n\) joints, the transformation from the base frame to the end-effector is:

\[{}^0T_n = {}^0T_1 \cdot {}^1T_2 \cdot \ldots \cdot {}^{n-1}T_n\]

For a planar 2R manipulator:

\[x = L_1\cos\theta_1 + L_2\cos(\theta_1 + \theta_2)\]

\[y = L_1\sin\theta_1 + L_2\sin(\theta_1 + \theta_2)\]

Inverse Kinematics

Inverse kinematics (IK) is the reverse problem: given a desired end-effector pose, find the joint angles. This is generally more challenging as it may have:

Geometric Solution for Planar 2R Manipulator:

\[\theta_2 = \pm \cos^{-1}\left(\frac{x^2 + y^2 - L_1^2 - L_2^2}{2L_1L_2}\right)\]

\[\theta_1 = \text{atan2}(y, x) - \text{atan2}\left(L_2\sin\theta_2,\ L_1 + L_2\cos\theta_2\right)\]

The ± sign gives two solutions: elbow-up (+) and elbow-down (-).

Workspace: The workspace of a manipulator is the set of all positions the end-effector can reach. For a planar 2R manipulator, the workspace is an annulus (ring) with inner radius \(|L_1 - L_2|\) and outer radius \(L_1 + L_2\).

Interactive Simulation 1: Forward Kinematics

Adjust the joint angles and link lengths to see how the robot manipulator moves. The forward kinematics equations calculate the end-effector position (shown as a red circle). Observe how the coordinate frames move with each link.

30°
45°
60°
120
100
80

End-Effector Position

X = 0.00 mm

Y = 0.00 mm

Radial Distance = 0.00 mm

Interactive Simulation 2: Inverse Kinematics

Click anywhere in the workspace to set a target position (green circle). The inverse kinematics solver will calculate the required joint angles. For a 2R manipulator, there are typically two solutions: Elbow-Up and Elbow-Down. Use the toggle button to switch between solutions.

120
100

IK Solution

Target: X = 150 mm, Y = 100 mm

θ₁ = 0.0°

θ₂ = 0.0°

Status: Solution Found

Engineering Applications

Summary of Key Equations

Concept Equation Description
DH Transformation \({}^{i-1}T_i = Rot_{z,\theta_i} Trans_{z,d_i} Trans_{x,a_i} Rot_{x,\alpha_i}\) Transformation from frame i-1 to i
Forward Kinematics \({}^0T_n = \prod_{i=1}^{n} {}^{i-1}T_i\) Base to end-effector transformation
2R FK: X Position \(x = L_1\cos\theta_1 + L_2\cos(\theta_1 + \theta_2)\) End-effector x-coordinate
2R FK: Y Position \(y = L_1\sin\theta_1 + L_2\sin(\theta_1 + \theta_2)\) End-effector y-coordinate
2R IK: θ₂ \(\theta_2 = \pm\cos^{-1}\left(\frac{x^2+y^2-L_1^2-L_2^2}{2L_1L_2}\right)\) Second joint angle (± for two solutions)
2R IK: θ₁ \(\theta_1 = \text{atan2}(y,x) - \text{atan2}(L_2\sin\theta_2, L_1+L_2\cos\theta_2)\) First joint angle
Workspace Radius \(R_{\text{min}} = |L_1 - L_2|, \quad R_{\text{max}} = L_1 + L_2\) Reachable workspace boundaries
Reachability Condition \(|L_1 - L_2| \leq \sqrt{x^2 + y^2} \leq L_1 + L_2\) Target must be within workspace

Denavit-Hartenberg Table Example (3R Planar Manipulator)

Joint \(i\) \(\theta_i\) \(d_i\) \(a_i\) \(\alpha_i\)
1 \(\theta_1\)* 0 \(L_1\) 0
2 \(\theta_2\)* 0 \(L_2\) 0
3 \(\theta_3\)* 0 \(L_3\) 0

* indicates joint variable (revolute joint)

Practice Problems

Problem 1: Forward Kinematics of 2R Manipulator

A planar 2R robot manipulator has link lengths \(L_1 = 150\) mm and \(L_2 = 100\) mm. The joint angles are \(\theta_1 = 30°\) and \(\theta_2 = 45°\). Calculate the position of the end-effector.

Show Solution

Problem 2: Workspace of 2R Manipulator

For the same manipulator in Problem 1 with \(L_1 = 150\) mm and \(L_2 = 100\) mm, determine the workspace. What is the minimum and maximum reach?

Show Solution

Problem 3: Inverse Kinematics - Elbow-Up Configuration

A 2R manipulator with \(L_1 = 100\) mm and \(L_2 = 100\) mm needs to reach a target at position (120, 80) mm. Calculate the joint angles for the elbow-up configuration.

Show Solution

Problem 4: Unreachable Target

Can a 2R manipulator with \(L_1 = 80\) mm and \(L_2 = 60\) mm reach a target at (200, 50) mm? If not, explain why and suggest the closest reachable point.

Show Solution

Knowledge Check Quiz

Question 1: What does forward kinematics compute?

Question 2: How many DH parameters are needed to describe each link?

Question 3: For a planar 2R manipulator with L₁ = 150 mm and L₂ = 100 mm, what is the maximum reach?

Question 4: How many solutions typically exist for the inverse kinematics of a 2R planar manipulator?

Question 5: What shape is the workspace of a planar 2R manipulator?

Question 6: Which of the following is NOT a DH parameter?

Question 7: When is a target position unreachable for a 2R manipulator?

Question 8: In the homogeneous transformation matrix, what does the 4×4 size allow us to represent?