Linear Algebra Application: Robot Kinematics

Forward Kinematics: Modeling, Motion Planning, and Control

Imron Rosyadi

Robot Kinematics: Modeling, Motion Planning, and Control

Forward Kinematics: ECE Applications in Robotics

What is Forward Kinematics?

Kinematics describes the motion of a manipulator. It analyzes position, velocity, and acceleration without considering the forces causing the motion.

Forward Kinematics is used to calculate the position and orientation of the end-effector given:

  1. A kinematic chain with multiple degrees of freedom.
  2. The joint variables (angles for revolute joints, displacements for prismatic joints).

Important

Goal of Forward Kinematics: To determine where the robot’s “hand” (end-effector) is, and how it’s oriented in space.

Robot Anatomy: Key Components

An articulated robot is typically composed of:

  • Base: Anchor point, supports the unit.
  • Shoulder, Elbow: Jointed sections allowing movement.
  • Spherical Wrist: Connects arm to gripper.
  • Gripper: The end-effector, interacts with the environment.

Figure 2.1 Illustration of a robot.

Note

End-effector: The part of the robot that interacts with its environment. Examples:

  • Gripper
  • Welding gun
  • Magnet
  • Force-torque sensors
  • Tool changers

Robot Joints: Types and Degrees of Freedom

Each joint, like the elbow, is an actuator that causes relative motion between two links.

Revolute (R) Joint

  • Has 1 Degree of Freedom (DoF).
  • Axis of rotation becomes the \(z_i\) axis.
  • Joint variable: \(\theta_i\) (in degrees), representing relative angular displacement.

Figure 2.2 Revolute (R) joint.

Prismatic (P) Joint

  • Also has 1 DoF.
  • Axis of translation becomes the \(z_i\) axis.
  • Joint variable: \(d_i\) (in meters), representing relative linear displacement.

Figure 2.3 Prismatic (P) joint.

\[ q_i=\begin{Bmatrix} \theta_i & \textrm{if joint $i$ is revolute}\\ d_i & \textrm{if joint $i$ is prismatic}\end{Bmatrix} \quad \text{(2.22)} \]

Rigid Motion & Homogeneous Matrices: Overview

This section covers the analytical approach to representing:

  • Position of a point in space.
  • Rotation in 2D and 3D.
  • Rigid Motions, combining rotation and translation.
  • Homogeneous Transformations, a powerful tool for unified representation.

Understanding these concepts is foundational for calculating forward kinematics.

Representing Position: Coordinate Frames

Robotics often uses Cartesian coordinates for task definition. We represent the position of a point, \(p\), relative to a chosen coordinate frame.

Figure 2.4 Two coordinate frames with a point, \(p\), and two vectors, \(p^0\) and \(p^1\).

A point \(p\) can be defined with respect to:

  • Frame {0}: \(p^0=\begin{bmatrix} 5\\ 6 \end{bmatrix}\)
  • Frame {1}: \(p^1=\begin{bmatrix} -2.8\\ 4.2 \end{bmatrix}\)

The origin of frame {1} with respect to {0}: \(o_1^0=\begin{bmatrix} 10\\ 5 \end{bmatrix}\)

The origin of frame {0} with respect to {1}: \(o_0^1=\begin{bmatrix} -10.6\\ 3.5 \end{bmatrix}\)

Note

Always specify the reference frame when representing a point or vector (e.g., \(p^0\) vs. \(p^1\)). This prevents ambiguity.

Representing Rotation: 2D & 3D

Rotations are fundamental to robot movement. We will explore:

  • Two-Dimensional (Planar) Rotations: Simpler case, good for intuition.
  • Three-Dimensional Rotations: Essential for real-world robotics.
  • Rules of Rotation Matrices: Important properties and operations.

These concepts form the basis for describing the orientation of robot links.

2D Rotations: The Rotation Matrix

A rotation matrix \(R_1^0\) describes the orientation of frame {1} relative to frame {0}.

It is formed by projecting the axes of frame {1} onto the coordinate axes of frame {0}.

\[ R_1^0=\begin{bmatrix} x_1 \cdot x_0 & y_1 \cdot x_0\\ x_1 \cdot y_0 & y_1 \cdot y_0 \end{bmatrix} \quad \text{(2.1)} \]

The columns of \(R_1^0\) are the unit vectors of frame {1}’s axes, expressed in frame {0}’s coordinates.

Example: Planar Rotation

Consider a planar rotation of frame {1} by an angle \(\theta\) relative to frame {0}.

Figure 2.5 Planar rotation of \(\theta\) degrees.

The rotation matrix \(R_1^0\) is:

\[ R_1^0 = \begin{bmatrix} x_1^0 & y_1^0 \end{bmatrix} \quad \text{(2.2)} \]

By projecting the axes:

\[ R_1^0 = \begin{bmatrix} \cos \theta & -\sin\theta\\ \sin\theta & \cos\theta \end{bmatrix} \quad \text{(2.3)} \]

This matrix represents the orientation of frame {1} with respect to frame {0}.

Rules of Rotation Matrices

Rotation matrices (\(R\)) have specific properties:

  • Orthogonal: \(R^T = R^{-1}\).
  • Special Orthogonal Group SO(n): Determinant \(\det(R) = +1\) (due to right-hand rule).
  • Columns (and rows) are mutually orthogonal unit vectors.

Inverse Rotation

To find \(R_0^1\) (frame {0} w.r.t. {1}): \[ R_0^1 = (R_1^0)^T \quad \text{(2.4)} \]

Chained Rotations

If \(R_1^0\) and \(R_n^1\) are known, then: \[ R_n^0 = R_1^0 R_n^1 \quad \text{(2.5)} \]

Warning

Important Rule for Matrix Multiplication:

  • Pre-multiply when rotation is about a fixed/world frame.
  • Post-multiply when rotation is about the current frame.

3D Rotations: Extending the Matrix

The principle for 3D rotations is the same as 2D: project axes of frame {1} onto frame {0}.

\[ R_1^0 = \begin{bmatrix} x_1 \cdot x_0 & y_1 \cdot x_0 & z_1 \cdot x_0\\ x_1 \cdot y_0 & y_1 \cdot y_0 & z_1 \cdot y_0 \\ x_1 \cdot z_0 & y_1 \cdot z_0 & z_1 \cdot z_0 \end{bmatrix} \quad \text{(2.6)} \]

This \(3 \times 3\) matrix belongs to \(SO(3)\) (Special Orthogonal Group of order 3).

Example: Rotation about \(z_0\)-axis

Find the rotation matrix \(R_1^0\) when frame {1} is rotated by angle \(\theta\) about the \(z_0\)-axis.

Figure 2.6 Rotation through an angle \(\theta\) about the \(z_0\)-axis.

From the figure: \(x_1 \cdot x_0 = \cos \theta\), \(y_1 \cdot x_0 = -\sin \theta\) \(x_1 \cdot y_0 = \sin \theta\), \(y_1 \cdot y_0 = \cos \theta\) \(z_0 \cdot z_1 = 1\) All other dot products are zero.

Resulting Rotation Matrix: \[ R_1^0 = R_{z,\theta} = \begin{bmatrix} \cos \theta & -\sin \theta & 0\\ \sin \theta & \cos \theta & 0 \\ 0 & 0 & 1\end{bmatrix} \quad \text{(2.7)} \]

Rotations about x- and y-axes

\[ R_{x,\theta} = \begin{bmatrix} 1 & 0 & 0\\ 0 & \cos \theta & -\sin \theta \\ 0 & \sin \theta & \cos \theta\end{bmatrix} \quad \text{(2.8)} \]

\[ R_{y,\theta} = \begin{bmatrix} \cos \theta & 0 & \sin \theta\\ 0 & 1 & 0 \\ -\sin \theta & 0 & \cos \theta\end{bmatrix} \quad \text{(2.9)} \]

Example: Chaining Rotations

Find the rotation matrix after the following rotations occur:

  1. Rotate by \(\theta\) about the current x-axis
  2. Rotate by \(\phi\) about the current z-axis
  3. Rotate by \(\alpha\) about the fixed z-axis
  4. Rotate by \(\beta\) about the current y-axis
  5. Rotate by \(\gamma\) about the fixed x-axis

Start with the initial rotation and apply the pre/post-multiplication rule:

\[ R=R_{x,\gamma}R_{z,\alpha}R_{x,\theta}R_{z,\phi}R_{y,\beta} \]

Tip

Reminder:

  • Fixed frame rotation: Pre-multiply (\(R_{fixed} R_{current\_total}\))
  • Current frame rotation: Post-multiply (\(R_{current\_total} R_{new\_current}\))

Rigid Motion: Translation and Rotation Combined

A rigid motion is a combination of a pure translation and a pure rotation.

To express a point \(p^1\) (in frame {1}) with respect to frame {0}:

\[ p^0=R_1^0p^1+d^0 \quad \text{(2.10)} \]

Where: - \(R_1^0\) is the rotation matrix of frame {1} w.r.t. frame {0}. - \(d^0\) is the vector from frame {0} origin to frame {1} origin, expressed in frame {0}.

Figure 2.7 The location of the blue dot in frame {0}.

Figure 2.8 The location of the blue dot in frame {1}.

Chained Rigid Motions

Consider three frames: {0}, {1}, and {2}.

  • \(d_1^0\): vector from origin of {0} to origin of {1}.
  • \(d_2^1\): vector from origin of {1} to origin of {2}.
  • \(p^2\): point \(p\) represented in frame {2}.

To compute \(p^0\) (point \(p\) relative to frame {0}):

  1. Transform \(p^2\) to frame {1}: \(p^1=R_2^1p^2+d_2^1 \quad \text{(2.11)}\)
  2. Transform \(p^1\) to frame {0}: \(p^0=R_1^0p^1+d_1^0 \quad \text{(2.12)}\)
  3. Substitute (2.11) into (2.12): \(p^0=R_1^0(R_2^1p^2+d_2^1)+d_1^0 = R_1^0R_2^1p^2+R_1^0d_2^1+d_1^0 \quad \text{(2.13)}\)

We define:

  • \(R_2^0=R_1^0R_2^1 \quad \text{(2.14)}\)
  • \(d_2^0=d_1^0+R_1^0d_2^1 \quad \text{(2.15)}\)

Thus, the final transformation is: \[ p^0=R_2^0p^2+d_2^0 \quad \text{(2.16)} \]

Homogeneous Transformation: Unified Representation

A Homogeneous Transformation combines rotation and translation into a single matrix multiplication. This simplifies coordinate transformations.

The homogeneous matrix \(H\) is a \(4 \times 4\) matrix:

\[ H=\begin{bmatrix} R & d\\ 0 & 1\end{bmatrix}, R\in SO(3), d \in \mathbb{R}^3 \quad \text{(2.17)} \]

Where \(R\) is the \(3 \times 3\) rotation matrix and \(d\) is the \(3 \times 1\) translation vector.

Inverse Homogeneous Transformation

\[ H^{-1}=\begin{bmatrix} R^T & -R^Td \\ 0 & 1\end{bmatrix} \quad \text{(2.18)} \]

Basic Homogeneous Transformations

These are fundamental transformations for translation and rotation about principal axes. (Note: \(c_\alpha = \cos \alpha\), \(s_\alpha = \sin \alpha\))

X-axis Translation & Rotation

\[ Trans_{x,a} = \begin{bmatrix} 1 & 0 & 0 & a\\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}, Rot_{x,\alpha} = \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & c_\alpha & -s_\alpha & 0 \\ 0 & s_\alpha & c_\alpha & 0 \\ 0 & 0 & 0 &1\end{bmatrix} \quad \text{(2.19)} \]

Y-axis Translation & Rotation

\[ Trans_{y,b} = \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & b \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}, Rot_{y,\beta} = \begin{bmatrix}c_\beta & 0 & s_\beta & 0\\ 0 & 1 & 0 & 0 \\ -s_\beta & 0 & c_\beta & 0 \\ 0 & 0 & 0 &1\end{bmatrix} \quad \text{(2.20)} \]

Z-axis Translation & Rotation

\[ Trans_{z,c} = \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & c \\ 0 & 0 & 0 & 1 \end{bmatrix}, Rot_{z,\gamma} = \begin{bmatrix} c_\gamma & -s_\gamma & 0 & 0\\ s_\gamma & c_\gamma & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 &1\end{bmatrix} \quad \text{(2.21)} \]

Example: Complex Homogeneous Transformation

Find a homogeneous transformation matrix \(H\) that represents a sequence of operations:

  1. Rotation of angle \(\alpha\) about the current x-axis
  2. Translation of \(b\) along the current x-axis
  3. Translation of \(d\) along the current z-axis
  4. Rotation of angle \(\theta\) about the current z-axis

Since all transformations are about current axes, we post-multiply in the order given:

\[ H = Rot_{x,\alpha} Trans_{x,b} Trans_{z,d} Rot_{z,\theta} \]

The resulting matrix:

\[ H=\begin{bmatrix} c_\theta & -s_\theta & 0 & b\\ c_\alpha s_\theta & c_\alpha c_\theta & -s_\alpha & -ds_\alpha \\ s_\alpha s_\theta & s_\alpha c_\theta & c_\alpha & dc_\alpha \\ 0 & 0 & 0 & 1\end{bmatrix} \]

Kinematic Chains: Robot Structure

A robot is comprised of links connected by joints (R or P), forming a kinematic chain.

Labeling Convention

  • Joints are labeled from 1 to \(n\).
  • Links are labeled from 0 to \(n\), with Link 0 being the fixed base.

The joint variable, \(q_i\), depends on the joint type:

\[ q_i=\begin{Bmatrix} \theta_i & \textrm{if joint $i$ is revolute}\\ d_i & \textrm{if joint $i$ is prismatic}\end{Bmatrix} \quad \text{(2.22)} \]

Transformation Matrix (\(T_j^i\))

Represents the position and orientation of frame {j} with respect to {i}.

\[ T_j^i=\begin{Bmatrix} A_{i+1}A_{i+2}\cdots A_{j} & \textrm{if $i < j$}\\ (A_{j+1}A_{j+2}\cdots A_{i})^{-1} & \textrm{if $i > j$}\end{Bmatrix} \quad \text{(2.23)} \]

Where \(A_i\) is the homogeneous transformation from frame \(i-1\) to \(i\): \[ A_i=\begin{bmatrix} R_i^{i-1} & o_i^{i-1}\\ 0 & 1 \end{bmatrix} \quad \text{(2.24)} \]

Forward Kinematics: Trigonometry Method

The trigonometry method is suitable for simple, planar robots.

Approach:

  1. Place the robot in a 2-D planar coordinate system.
  2. Find the angles between each joint movement.
  3. Use trigonometric functions (\(\sin\), \(\cos\)) to find the end-effector’s coordinates relative to the base.

This method provides intuitive geometric insights but can become complex for 3D or multi-link manipulators.

Denavit-Hartenberg (DH) Convention

The Denavit-Hartenberg (DH) convention is a standardized method for assigning coordinate frames to robot links and deriving the kinematic equations.

It simplifies the calculation of the homogeneous transformation matrix (\(A_i\)) between adjacent links:

\[ A_i=Rot_{z,\theta}Trans_{z,d}Trans_{x,a}Rot_{x,\alpha}=\begin{bmatrix} c_\theta & -s_\theta c_\alpha & s_\theta s_\alpha & a c_\theta\\ s_\theta & c_\theta c_\alpha & -c\theta s_\alpha & as_\theta \\ 0 & s_\alpha & c_\alpha & d \\ 0 & 0 & 0 & 1\end{bmatrix} \quad \text{(2.25)} \]

This matrix encapsulates all four DH parameters: \(a\), \(\alpha\), \(d\), \(\theta\).

DH Convention Steps: Drawing & Axes

Step 1: Draw out the robot

  • Illustrate the revolute and prismatic joints.
  • Set the \(z_i\) axis as the axis of rotation for revolute joints or the axis of translation for prismatic joints.
  • Define the joint variable (\(\theta_i\) or \(d_i\)).

Step 2: Assign the remaining axes

  • The \(x_i\) axis must be perpendicular to both \(z_i\) and \(z_{i-1}\).
  • It must also intersect with \(z_{i-1}\).
  • The \(y_i\) axis is determined by the right-hand rule (thumb \(z_i\), index finger \(x_i\), middle finger \(y_i\)).

Note

Right-Hand Rule: Align your thumb with the positive \(z\)-axis, your index finger with the positive \(x\)-axis, and your middle finger will point to the positive \(y\)-axis.

DH Convention Steps: Assigning Parameters

Step 3: Assign the DH parameters

  • Link Length (\(a_i\)): Measured along \(x_i\), distance between \(z_{i-1}\) and \(z_i\).
  • Link Twist (\(\alpha_i\)): Angle between \(z_{i-1}\) and \(z_i\), measured in a plane normal to \(x_i\).
  • Joint Offset (\(d_i\)): Measured along \(z_{i-1}\), distance from origin \(O_{i-1}\) to the intersection of \(x_i\) and \(z_{i-1}\).
    • If joint \(i\) is revolute, \(d_i\) is constant.
  • Joint Angle (\(\theta_i\)): Angle between \(x_{i-1}\) and \(x_i\), measured in a plane normal to \(z_{i-1}\).
    • If joint \(i\) is prismatic, \(\theta_i\) is constant.

Tip

For a visual guide, watch this YouTube video by TekkotsuRbotics.

DH Convention Steps: Table & Matrices

Step 4: Create a DH table

List all known values. Use * for variable joint parameters.

Links \(a_i\) \(\alpha_i\) \(d_i\) \(\theta_i\)
1 \(a_1\) \(\alpha_1\) \(d_1\) \(\theta_1\)
\(i\) \(a_i\) \(\alpha_i\) \(d_i\) \(\theta_i\)

Step 5: Calculate each \(A_i\) matrix

Use Equation (2.25) with the parameters from the DH table. (Note: Link 0 doesn’t have an A matrix).

Step 6: Calculate the \(T\) matrix

The overall transformation \(T_n^0\) (end-effector w.r.t. base) is the product of all \(A_i\) matrices:

\[ T_n^0 = A_1 A_2 \cdots A_n \]

Forward Kinematics: Screw Theory

Screw Theory is an alternative to the Denavit-Hartenberg convention. It describes rigid motion as a twist about a screw axis.

Key Ideas:

  • Only two coordinate systems are needed:
    • Space {s} frame: Fixed in space.
    • Body {b} frame: End-effector frame, moves with the robot.
  • Uses the Product of Exponentials (PoE) formula for transformation matrix \(T(\theta)\).

Multiplication Rules

  • If using {s} frame: Pre-multiplication (\(e^{\hat{S}_1\theta_1} \dots M\))
  • If using {b} frame: Post-multiplication (\(M \dots e^{\hat{B}_n\theta_n}\))

Screw Theory: Twists & Screw Axis

A twist defines a body’s instantaneous linear and angular velocity. It is described by a screw axis, which has:

  • A point \(q\) on the axis.
  • A unit vector \(s\) in the direction of the axis.
  • A pitch \(h\).

Figure 2.12 Screw axis representation.

The pitch (\(h\)) is the ratio of linear to angular speed: \[ h=pitch=\frac{\textrm{linear speed}}{\textrm{angular speed}} \quad \text{(2.26)} \]

The screw axis \(S\) represents angular velocity (\(\omega\)) and linear velocity (\(v\)) components: \[ S=\begin{bmatrix} S_\omega\\ S_v \end{bmatrix}=\begin{bmatrix} \textrm{angular velocity when } \dot{\theta}=1\\ \textrm{linear velocity of the origin when } \dot{\theta}=1 \end{bmatrix} \quad \text{(2.27)} \]

Figure 2.13 Screw axis representation with the linear velocity of the origin defined.

The full twist \(V\) is: \[ V=\begin{bmatrix} \omega\\ v \end{bmatrix}=S\dot{\theta} \quad \text{(2.28)} \]

Twists: Finite and Infinite Pitch

Finite Pitch:

  • Both rotation and translation occur.
  • \(\|S_\omega\|=1\)
  • \(\dot{\theta}\) represents rotation speed.

Infinite Pitch (Prismatic Joint):

  • Purely linear motion, no rotation.
  • \(S_\omega=0\)
  • \(\|S_v\|=1\)
  • \(\dot{\theta}\) represents linear speed.

Body Twist (\(V_b\))

Defined in the {b} frame (end-effector): \[ V_b=(\omega_b,v_b)=S\dot{\theta} \quad \text{(2.29)} \]

Spatial Twist (\(V_s\))

Defined in the {s} frame (space/fixed): \[ V_s=(\omega_s,v_s)=S\dot{\theta} \quad \text{(2.30)} \]

Example: Simple Twist

Consider a zero-pitch screw, with a pure rotation. The screw is pointing out of the screen (black dot). Imagine the dotted line rotates counterclockwise. Find the angular and linear velocity.

This corresponds to: \[ S_\omega=\begin{bmatrix} 0\\ 0 \\ 1 \end{bmatrix}, S_v=\begin{bmatrix} 0\\ -2 \\ 0 \end{bmatrix} \]

Screw Theory: Practical Procedure

To find forward kinematics using screw theory:

Step 1: Establish {s} and {b} frames

  • {s} frame: Basic coordinate system fixed in space.
  • {b} frame: End-effector coordinate system, moves with the robot.

Step 2: Determine \(M\)

The transformation matrix \(M\) of the end-effector frame when all joint variables \(\theta = 0^\circ\).

Step 3: Find Screw Axes

Determine the {s} frame screw axes \(S_1, \dots, S_n\) or {b} frame screw axes \(B_1, \dots, B_n\) for each of the \(n\) joint axes when \(\theta = 0^\circ\).

Step 4: Evaluate the Product of Exponentials (PoE)

For {s} frame (space frame): \[ T(\theta)=e^{\hat{S}_1\theta_1}e^{\hat{S}_2\theta_2}\cdots e^{\hat{S}_n\theta_n}M \quad \text{(2.31)} \]

For {b} frame (body frame): \[ T(\theta)=Me^{\hat{B}_1\theta_1}e^{\hat{B}_2\theta_2}\cdots e^{\hat{B}_n\theta_n} \quad \text{(2.32)} \]

Example: Screw Theory in {s} frame

Consider an RPR (Revolute-Prismatic-Revolute) robot in its’ zero-frame orientation and then in a rotated orientation. Derive the forward kinematics using Screw Theory.

Zero-frame orientation: \(\theta=\begin{bmatrix} 0 \\ 0 \\ 0\end{bmatrix}\)

Rotated orientation: \(\theta=\begin{bmatrix} 0 \\ 0.5 \\ 45^\circ\end{bmatrix}\)

Step 1 & 2: {s} and {b} frames, and \(M\)

Analyzing the zero-frame, the matrix \(M\) (initial end-effector pose in space frame) is: \[ M=\begin{bmatrix} 1 & 0 & 0 & 3\\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \]

Step 3: {s} frame Screw Axes (\(S_i\))

\[ S_1=\begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \\ 0 \\ 0\end{bmatrix}, S_2=\begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \\ 0 \\ 0\end{bmatrix}, S_3=\begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \\ -2 \\ 0\end{bmatrix} \]

Chapter Summary

We’ve explored three methods for solving Forward Kinematics:

  1. Trigonometry Method:
    • Best for simple, 2D planar robots.
    • Intuitive geometric understanding.
  2. Denavit-Hartenberg (DH) Convention:
    • Most commonly used, systematic approach.
    • Requires defining four parameters (\(a, \alpha, d, \theta\)) for each link-joint pair.
    • Results in a chain of homogeneous transformations.
  3. Screw Theory:
    • Alternative, more modern approach.
    • Focuses on twists about screw axes.
    • Uses Product of Exponentials (PoE) formula.
    • Requires defining fixed space frame {s} and end-effector frame {b}.

Each method has its strengths and is chosen based on robot complexity and analysis requirements.

Useful Properties for Practice

These trigonometric identities are often useful in kinematic derivations:

  • Pythagorean identity: \(\cos^2\theta+\sin^2\theta=1 \quad \text{(2.33)}\)

  • Angle addition/subtraction (example given is incorrect, correct version is below): \(\cos(\theta_1+\theta_2)\cos\theta_1+\sin(\theta_1+\theta_2)\sin\theta_1 = \cos(\theta_2) \quad \text{(2.34)}\) (Original was \(\cos(\theta_1 + \theta_2 - \theta_1) = \cos\theta_1\), which simplifies to \(\cos(\theta_2)\))

  • Sine addition/subtraction: \(\sin(\alpha\pm\beta)=\sin\alpha \cos\beta \pm \cos\alpha \sin\beta \quad \text{(2.35)}\)

  • Cosine addition/subtraction: \(\cos(\alpha\pm\beta)=\cos\alpha \cos\beta \mp \sin\alpha \sin\beta \quad \text{(2.36)}\)

Practice Question 1: Rotation Matrix

Frame {0} and frame {1} are shown below. Find the resulting rotation matrix \(R_1^0\).

Answer:

First, identify the unit vectors of frame {1} in terms of frame {0}: \(x_1 = \begin{bmatrix} \frac{1}{\sqrt{2}}\\ 0 \\ \frac{1}{\sqrt{2}} \end{bmatrix}, y_1 = \begin{bmatrix} \frac{1}{\sqrt{2}}\\ 0 \\ -\frac{1}{\sqrt{2}} \end{bmatrix}, z_1 = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}\)

Then, form \(R_1^0\) by these column vectors: \[ R_1^0 = \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} & 0\\ 0 & 0 & 1\\ \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} & 0\end{bmatrix} \]

Practice Question 2: Chained Rotations (Current Axes)

An x-y-z axis coordinate system experiences:

  1. A rotation of angle \(\phi\) about the current y-axis.
  2. A rotation of angle \(\theta\) about the current z-axis.

Find the resulting rotation matrix.

Answer:

Since both rotations are about current axes, we post-multiply: \(R = R_{y,\phi} R_{z,\theta}\)

\[ R=\begin{bmatrix} \cos\phi & 0 & \sin\phi \\ 0 & 1 & 0 \\ -\sin\phi & 0 & \cos\phi\end{bmatrix}\begin{bmatrix} \cos\theta & -\sin\theta & 0\\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1\end{bmatrix} \]

\[ R=\begin{bmatrix} c_\phi c_\theta & -c_\phi s_\theta & s_\phi \\ s_\theta & c_\theta & 0 \\ -s_\phi c_\theta & s_\phi s_\theta & c_\phi \end{bmatrix} \]

Practice Question 3: Chained Rotations (Fixed & Current)

Find the rotation matrix for the following sequence:

  1. Rotate by \(\alpha\) about the current x-axis.
  2. Rotate by \(\theta\) about the fixed z-axis.
  3. Rotate by \(\phi\) about the fixed y-axis.

Answer: We build the total rotation matrix \(R\) by applying the fixed/current rule: \(R = Rot_{y,\phi} Rot_{z,\theta} Rot_{x,\alpha}\)

\[ R = \begin{bmatrix} c_\phi & 0 & s_\phi \\ 0 & 1 & 0 \\ -s_\phi & 0 & c_\phi\end{bmatrix}\begin{bmatrix}c_\theta & -s_\theta & 0 \\ s_\theta & c_\theta & 0 \\ 0 & 0 & 1\end{bmatrix}\begin{bmatrix}1 & 0 & 0 \\ 0 & c_\alpha & -s_\alpha \\ 0 & s_\alpha & c_\alpha \end{bmatrix} \]

\[ R = \begin{bmatrix} c_\phi c_\theta & s_\phi s_\alpha - c_\phi s_\theta c_\alpha & c_\phi s_\theta s_\alpha + s_\phi c_\alpha \\ s_\theta & c_\theta c_\alpha & -c_\theta s_\alpha \\ -s_\phi c_\theta & s_\phi s_\theta c_\alpha + c_\phi s_\alpha & c_\phi c_\alpha - s_\phi s_\theta s_\alpha \end{bmatrix} \]

Practice Question 4: Homogeneous Transformation

Frame {0} and frame {1} are shown below with their respective vectors. All axes are parallel (\(z_0 || y_1, x_0 || x_1, y_0 || z_1\)). Find the position vector \(p^0\) and the homogeneous transformation matrix \(H_1^0\).

Answer: From the image, \(x_0 || x_1\), \(y_0 || z_1\), \(z_0 || y_1\). This means frame {1} is rotated 90 degrees about \(x_0\) relative to frame {0}.

So, \(R_1^0 = R_{x,90^\circ} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{bmatrix}\).

The translation vector \(d_1^0 = \begin{bmatrix} 0 \\ 3 \\ 1 \end{bmatrix}\).

The point \(p^1 = \begin{bmatrix} 2 \\ 1 \\ 0 \end{bmatrix}\).

Position vector \(p^0 = R_1^0 p^1 + d_1^0\):

\(p^0 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{bmatrix} \begin{bmatrix} 2 \\ 1 \\ 0 \end{bmatrix} + \begin{bmatrix} 0 \\ 3 \\ 1 \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \\ 1 \end{bmatrix} + \begin{bmatrix} 0 \\ 3 \\ 1 \end{bmatrix} = \begin{bmatrix} 2 \\ 3 \\ 2 \end{bmatrix}\)

Homogeneous transformation matrix \(H_1^0\): \[ H_1^0=\begin{bmatrix} R_1^0 & d_1^0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & -1 & 3 \\ 0 & 1 & 0 & 1 \\ 0 & 0 & 0 & 1 \end{bmatrix} \]

Practice Question 5: DH Convention - Cylindrical Robot

Derive the forward kinematics equations using the DH Convention for the cylindrical robot shown.

Answer:

DH Table:

Link \(a_i\) \(\alpha_i\) \(d_i\) \(\theta_i\)
1 0 \(d_1\) \(\theta_1^*\)
2 0 -90° \(d_2\) 0
3 0 \(d_3\) 0

\(A_i\) Matrices:

\[ A_1=\begin{bmatrix} c_1 & -s_1 & 0 & 0 \\ s_1 & c_1 & 0 & 0 \\ 0 & 0 & 1 & d_1 \\ 0 & 0 & 0 & 1 \end{bmatrix} \] \[ A_2=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & -1 & 0 & d_2 \\ 0 & 0 & 0 & 1 \end{bmatrix} \] \[ A_3=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & d_3 \\ 0 & 0 & 0 & 1 \end{bmatrix} \]

\(T_3^0\) Matrix:

\(T_3^0=A_1A_2A_3=\begin{bmatrix} c_1 & 0 & -s_1 & -d_3 s_1 \\ s_1 & 0 & c_1 & d_3 c_1 \\ 0 & -1 & 0 & d_1 + d_2 \\ 0 & 0 & 0 & 1 \end{bmatrix}\)

Practice Question 6: DH Convention - Robot Arm

Derive the forward kinematics equation using the DH Convention for the following robot.

Answer:

DH Table:

Link \(a_i\) \(\alpha_i\) \(d_i\) \(\theta_i\)
1 0 90° \(a_1\) \(\theta_1^*+90^\circ\)
2 0 \(a_2+a_3+d_2\) 0

\(A_i\) Matrices:

\[ A_1=\begin{bmatrix} -s_1 & 0 & c_1 & 0 \\ c_1 & 0 & s_1 & 0 \\ 0 & 1 & 0 & a_1 \\ 0 & 0 & 0 & 1 \end{bmatrix} \] \[ A_2=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & a_2 + a_3 + d_2 \\ 0 & 0 & 0 & 1 \end{bmatrix} \]

\(T_2^0\) Matrix:

\(T_2^0 = A_1 A_2 = \begin{bmatrix} -s_1 & 0 & c_1 & (a_2 + a_3 + d_2) c_1 \\ c_1 & 0 & s_1 & (a_2 + a_3 + d_2)s_1 \\ 0 & 1 & 0 & a_1 \\ 0 & 0 & 0 & 1 \end{bmatrix}\)

Practice Question 7: Twist - Angular and Linear Velocity

Find the angular and linear velocity for the following illustration.

Answer: \[ S_\omega=\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}, S_v=\begin{bmatrix} \frac{-2}{\sqrt{2}} \\ \frac{-2}{\sqrt{2}} \\ 0 \end{bmatrix} \]

Practice Question 8: Twist - Angular and Linear Velocity

Find the angular and linear velocity for the following illustration.

Answer: \[ S_\omega=\begin{bmatrix} 0 \\ -1 \\ 0 \end{bmatrix}, S_v = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} \]

Practice Question 9: Screw Theory - RPR Arm

Consider the following robot in its’ zero-frame orientation. Derive the forward kinematics using Screw Theory using either the space or end-effector frame.

Answer:

Initial Configuration Matrix \(M\):

\[ M=\begin{bmatrix}0 & -1 & 0 & 19 \\ -1 & 0 & 0 & 0 \\ 0 & 0 & -1 & -3 \\ 0 & 0 & 0 & 1 \end{bmatrix} \]

Space Frame Screw Axes (\(S_i\)):

\[ S_1=\begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \\ 0 \\ 0 \end{bmatrix}, S_2=\begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \\ -10 \\ 0 \end{bmatrix}, S_3=\begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \\ -19 \\ 0 \end{bmatrix}, S_4=\begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 1 \end{bmatrix} \]

End Effector Frame Screw Axes (\(B_i\)):

\[ B_1=\begin{bmatrix} 0 \\ 0 \\ -1 \\ -19 \\ 0 \\ 0 \end{bmatrix}, B_2=\begin{bmatrix} 0 \\ 0 \\ -1 \\ -9 \\ 0 \\ 0 \end{bmatrix}, B_3=\begin{bmatrix} 0 \\ 0 \\ -1 \\ 0 \\ 0 \\ 0 \end{bmatrix}, B_4=\begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ -1 \end{bmatrix} \]