Kinematics (robotics)
Forward kinematics
Jacobian
The Jacobian matrix consists of the partial derivatives of the end-effector position with respect to joint angles/lengths.
2D case with 2 revolute joints:
$$ \mathbf{J} = \begin{bmatrix} \frac{\partial x_e}{\partial \theta_1} & \frac{\partial x_e}{\partial \theta_2} \\ \frac{\partial y_e}{\partial \theta_1} & \frac{\partial y_e}{\partial \theta_2} \end{bmatrix} $$
This can be used to convert joint speeds into end-effector velocity:
$$ \begin{bmatrix} v_x \\ v_y \end{bmatrix} = \mathbf{J} \begin{bmatrix} \dot{\theta_1} \\ \dot{\theta_2} \end{bmatrix} $$
Consider the columns of the Jacobian matrix $\mathbf{J}$.
$$ \mathbf{J} = \begin{bmatrix} \mathbf{J}_1 & \mathbf{J}_2 \end{bmatrix} $$
Then, the velocity relation can be rewritten as:
$$ \begin{bmatrix} v_x \\ v_y \end{bmatrix} = \mathbf{J}_1 \dot{\theta_1} + \mathbf{J}_2 \dot{\theta_2} $$
$\mathbf{J}_1 \dot{\theta_1}$ is the endpoint velocity generated by $\dot{\theta_1}$ when $\theta_2$ is fixed, and $\mathbf{J}_2 \dot{\theta_2}$ is the endpoint velocity generated by $\dot{\theta_2}$ when $\theta_1$ is fixed. That means that the velocity will point in the direction of $\mathbf{J}_1$ when $\theta_1$ is changed, and the it will point in the direction of $\mathbf{J}_2$ when $\theta_2$ is changed.
Rotation matrices
A rotation matrix consists of the unit vectors after rotating the frame of reference.
$$ \mathbf{R} = \begin{bmatrix} \mathbf{n} & \mathbf{t} & \mathbf{b} \end{bmatrix} $$
$\mathbf{n}$, $\mathbf{t}$, and $\mathbf{b}$ are the unit vectors of the new rotated coordinate frame in the $x$, $y$, and $z$ directions respectively.
- It represents the orientation of the coordinate frame and provides the coordinate transformation from the body frame to the fixed frame.
- Its inverse is given by its transpose.
- The three unit vectors $\mathbf{n}$, $\mathbf{t}$, and $\mathbf{b}$ span 3D space, so this matrix is non-singular.
The position of a rigid body can be described by the column vector:
$$ \mathbf{x} = \begin{bmatrix} x \\ y \\ z \end{bmatrix} $$
This position is given in the terms of the new rotated coordinate frame, which is described by the orientation matrix $\mathbf{R}$.
In order to convert this into the previous frame, we can multiply the orientation by the matrix.
Consecutive coordinate transformations
To get the end-effector position, we can chain a bunch of coordinate transformations together by multiplying all of the rotation matrices that come before the vector, like this:
$$ \mathbf{x}_P^0 = \mathbf{x}_1^0 + \mathbf{R}_1^0\mathbf{x}_2^1 + \mathbf{R}_1^0 \mathbf{R}_2^1 \mathbf{x}_3^2 \dots $$
Commonly used rotation matrices
Rotation about $x$-axis:
$$ \mathbf{R}_x(\theta_x) = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos \theta_z & -\sin \theta_z \\ 0 & \sin \theta_z & \cos \theta_z \end{bmatrix} $$
Rotation about $y$-axis:
$$ \mathbf{R}_y(\theta_y) = \begin{bmatrix} \cos \theta_y & 0 & \sin \theta_y \\ 0 & 1 & 0 \\ -\sin \theta_y & 0 & \cos \theta_y \end{bmatrix} $$
Rotation about $z$-axis:
$$ \mathbf{R}_z(\theta_z) = \begin{bmatrix} \cos \theta_z & -\sin \theta_z & 0 \\ \sin \theta_z & \cos \theta_z & 0 \\ 0 & 0 & 1 \end{bmatrix} $$