December, 13, 2021

# Screws: a Geometric Description of Twists in Robotics

In the previous lesson, we learned about velocities in robotics. We became familiar with angular and linear velocities and saw that stacking them together gives us the twist. We also saw how we could change the frame of reference for angular velocities and twists.

This lesson is about screws as a geometric interpretation for twists and how they can be used to express configurations in robotics.

This lesson is part of the series of lessons on foundations necessary to express robot motions. For the complete comprehension of the Fundamentals of Robot Motions and the tools required to represent the configurations, velocities, and forces causing the motion, please read the following lessons (note that more lessons will be added in the future):

https://www.mecharithm.com/category/learning-robotics-mechatronics/fundamentals-of-robotics-course/fundamentals-of-robot-motions/

Also, reading some lessons from the base lessons of the Fundamentals of Robotics course are deemed invaluable.

Ok, now letโs see how twists and screws are related.

In a couple of lessons before, we saw that every rigid body displacement could be obtained by a finite rotation about and translation along a fixed screw axis ๐ and we became familiar with the exponential coordinates of robot motions. We saw that in order for us to define the screw axis, we needed to learn about velocities, and now that we have the necessary foundation for it, we can go back and look at the screw motion again. These tools will equip us for the robot kinematics lesson in the near future.

In the Velocities in Robotics lesson, we learned that the angular velocity ฯ could be represented by a unit axis ฯฬ and the rate of rotation ฮธฬ about this axis. Similarly, we can express a twist (that has an angular component and a linear component) as a screw axis ๐ and the rate ฮธฬ about this axis:

$\mathcal{V} = \mathcal{S} \dot{\theta}$

Any robot configuration can be achieved by starting from the home (fixed) reference frame at time t = 0 (T(0) = I) and then integrating this twist over a specified time to reach the final configuration, as we also saw before.

On the other hand, any rigid body velocity has a linear component and an angular component equivalent to the instantaneous velocity about some screw axis.

Suppose that the configuration of the body frame relative to the space frame at any time is represented by a rotation about and translation along the screw axis ๐ with the rate ฮธฬ (a scalar that shows how fast the body moves along the screw). The figure below shows this representation:

The screw axis ๐ can be represented in two ways.

## {q,ล,h} Interpretation of the Screw Axis

First, the screw axis can be represented by any point on the axis q โ โ3, the unit vector in the direction of the screw axis ล, and the screw pitch h, which is the linear speed along the screw axis divided by the angular speed ฮธฬ about the screw axis: {q,ล,h}.

The twist about the screw axis ๐ represented by {q,ล,h} can be defined as:

$\mathcal{V} = \begin{pmatrix}\omega\\v\end{pmatrix} = \begin{pmatrix}\hat{s}\dot{\theta}\\-\hat{s}\dot{\theta} \times q+h\hat{s}\dot{\theta}\end{pmatrix}$

ฯ is the angular velocity, and it is in the direction of the unit vector ล with the magnitude ฮธฬ, and the linear velocity v has two parts. hลฮธฬ is due to translation along the screw axis (in the ล direction) that exists when the screw has non-zero pitch and ฯรr = ลฮธฬร(-q) = -ลฮธฬรq is due to the linear motion at the origin which is the result of the rotation about the screw axis. We saw before that the linear velocity during the circular motion (that has zero pitch = no translational motion) is tangential to the circular path, and it can be calculated by the cross product of the angular velocity and the radius of the path (this is in the plane orthogonal to ล):

Now think in the reverse fashion. If we have the twist ๐ฑ = (ฯ,ฮฝ) and we want to find the screw axis {q,ล,h} and ฮธฬ that can generate the same twist, we will have two cases.

Case one is where we have rotational motion (ฯ โ  0), and the screw pitch is finite. If the angular velocity is not zero (we also have rotational motion), then the pitch h is finite, and ฮธฬ is the norm of the angular velocity vector (ฮธฬ = ||ฯ||). Then because ฯ = ลฮธฬ = ล||ฯ||, we can find ล = ฯ/||ฯ|| = ฯฬ. The pitch can be calculated using the equation h = ฯฬTฮฝ/||ฯ|| and q is chosen so that the term -ลฮธฬรq provides the portion of ฮฝ orthogonal to the screw axis.

Case two is where there is no rotational motion (ฯ = 0), and thus the pitch h is infinite and ล = ฮฝ/||ฮฝ|| and ฮธฬ is the linear speed ||ฮฝ|| along ล.

In this representation of the screw axis ๐, the pitch can be infinite, q is not unique (any point along the screw axis can be used), and it is a cumbersome collection. Hence, we opt for an alternative representation for the screw axis ๐.

## Screw Interpretation of a Twist in Robotics

As an alternative representation, the screw axis ๐ is defined as follows. First, we choose a reference frame and then define the screw axis ๐ as the 6-vector in that frameโs coordinates as:

$\mathcal{S} = \begin{pmatrix}\mathcal{S}_{\omega}\\\mathcal{S}_v\end{pmatrix} = \begin{pmatrix}\text{angular velocity when }\dot{\theta} = 1\\\text{linear velocity of the origin when } \dot{\theta} = 1\end{pmatrix}$

๐ฯ is the 3D unit angular velocity when the rate ฮธฬ = 1 and ๐ฮฝ is the 3D linear velocity of the origin of the frame when the rate is 1. We can conclude that the screw axis is a normalized twist and thus, the twist ๐ฑ = (ฯ,ฮฝ) can be represented by the multiplication of the screw axis ๐ by the scalar rate ฮธฬ (๐ฮธฬ). In this case, as we discussed, the screw axis ๐ can be defined using a normalized version of the twist ๐ฑ = (ฯ,ฮฝ) corresponding to motion along the screw.

As before, we will have two cases:

Case one is when there is a rotational component and ฯโ 0, and therefore the pitch h is finite. The angular component ๐ฯ of the screw axis is nonzero and the twist, ๐ฑ is normalized by the norm of the angular velocity vector:

$\mathcal{S} = \frac{\mathcal{V}}{||\omega||} = (\frac{\omega}{||\omega||},\frac{v}{||\omega||} )$

ฮธฬ = ||ฯ|| is the angular speed about the screw axis such that ๐ ฮธฬ = ๐ฑ. ||๐ฯ|| = 1 because we normalized it with the angular speed. ๐ฮฝ is arbitrary, with no constraints on it.

Case two is when there is no rotational motion (ฯ=0), and thus the pitch h is infinite. In this case, the motion is a purely linear motion with no rotation. The angular component is zero, and the linear part is a unit vector. In this case, the twist, ๐ฑ is normalized by the length of the linear velocity vector:

$\mathcal{S} = \frac{\mathcal{V}}{||v||} = (0,\frac{v}{||v||} )$

ฮธฬ = ||ฮฝ|| is the linear speed along the screw axis such that ๐ ฮธฬ = ๐ฑ. For this case, ๐ฯ = 0,  ||๐ฮฝ|| = 1 since we normalized it.

Note here that six numbers are needed to represent the screw axis ๐ = (๐ฯ,๐ฮฝ), but the space of all screws is five-dimensional (5D), and this is because either ๐ฯ or ๐v has a unit length. As discussed, if both the angular and linear components of the screw are non-zero meaning that we have a rotational motion as well, then the screw is defined so that ||๐ฯ|| = 1.

Now letโs see how we can define the matrix representation of the screw axis ๐.

## Matrix Representation of the Screw Axis ๐

Since the screw axis is the normalized version of the twist, then the matrix representation of the screw axis ๐ = (๐ฯ,๐v) can be defined as (for more information on why it has this matrix form, please refer to the lesson on the velocities in robotics):

$[\mathcal{S}] = \begin{pmatrix}[\mathcal{S}_{\omega}] & \mathcal{S}_v\\o & 0\end{pmatrix} \in se(3)$

Now letโs see how we can change the frame of reference in which a screw axis ๐ is defined.

## Change of Frame of Reference of a Screw Axis ๐

As we saw in the lesson on the velocities in robotics, the adjoint transformation could be used to change the frame of reference of the twist, and since the screw axis is a normalized twist, we can use the adjoint transformation to change the frame of reference of the screw axis as well:

$\mathcal{S}_a = [Ad_{T_{ab}}] \mathcal{S}_b\\\mathcal{S}_b = [Ad_{T_{ba}}] \mathcal{S}_a$

๐a is the screw axis representation in the frame {a}, and ๐b is the screw axis representation in the frame {b}.

If the screw axis ๐ is expressed in coordinates of the body frame {b}, ๐b, then ๐ฑb = (ฯb,ฮฝb) = ๐bฮธฬ is called the body twist which is not affected by choice of the space frame, and if the screw axis ๐ is expressed in coordinates of the space frame {s}, ๐s, then ๐ฑs= (ฯs,ฮฝs) = ๐sฮธฬ is called the spatial twist which is not affected by choice of the body frame. Thus, we only need to define the frame in which the twist (or screw) is represented. No other frames matter. A spatial twist depends on the {s} frame, and a body twist depends on the {b} frame.

Now, based on our knowledge about the screw axis, letโs go back to the exponential coordinate representation of rigid body motions.

## Exponential Coordinate Representation of Rigid Body Motions

In the exponential coordinate representation, ๐ฮธ โ โ6:

• If pitch of the screw axis ๐ = (๐ฯ,๐v) is finite then we have rotational motion and ฮธ is the angle of rotation about the screw axis.
• If the pitch is infinite then the motion is pure translation with no rotation and ฮธ is the linear distance travelled along the screw axis.

As we saw in the lesson about the exponential coordinates of rotation, the matrix exponential e[ฯฬ]ฮธ is equal to the rotation matrix that can act on a vector or a frame and can rotate it from the initial orientation to the final orientation. Similarly, the matrix representation of the screw axis can be used in the matrix exponential e[๐]ฮธ for rigid body motions. Thus, the matrix exponential for rigid body motions can map the elements of the Lie algebra se(3) to the elements of the Lie group SE(3):

exp: [๐]ฮธ โ se(3) โ T โ SE(3)

And this means that exponentiation takes the initial configuration of the frame to the final configuration of the frame by following along and about a screw axis ๐ by ฮธ.

And the matrix logarithm is the invert of the matrix exponential and finds the matrix representation of the exponential coordinates ๐ฮธ:

log: T โ SE(3) โ [๐]ฮธ โ se(3)

And this means that if we have a given configuration, we want to find the screw axis and ฮธ such that if followed along and about this screw axis by that amount gives the same configuration.

The normalized (unit) screw axis for full spatial motions is similar to the normalized angular velocity axis for pure rotations.

As we found a closed-form solution for the matrix exponential e[ฯฬ]ฮธ for orientations before, letโs examine if we can do the same for the matrix exponential e[๐]ฮธ for rigid body motions. Let the screw axis be ๐ = (๐ฯ,๐ฮฝ) then we will have two cases:

• If we have rotational motion, then for any distance ฮธ โ โtravelled along the axis, the matrix exponential for rigid body motions can be written as:

$e^{[\mathcal{S}]\theta} = \begin{pmatrix}e^{[\mathcal{S}_\omega]\theta} & \underbrace{(I\theta + (1-cos\theta)[\mathcal{S}_\omega] + (\theta-sin\theta)[\mathcal{S}_\omega]^2)}_{G(\theta)}\mathcal{S}_v\\o & 1\end{pmatrix}$

• And if the rotational part is zero and the screw axis is pure translation with no rotation, then:

$e^{[\mathcal{S}]\theta} = \begin{pmatrix}I & \mathcal{S}_v\theta\\o & 1\end{pmatrix}$

Here, ฮธ is the linear distance traveled. The matrix I in the upper left of the matrix shows that the orientation does not change, and the motion is pure translation.

The proof is similar to the approach that we used in the lesson about the exponential coordinates of rotation for the matrix exponential.

The inverse problem says that given an arbitrary configuration (R,p) โ SE(3), we can always find a screw axis ๐ = (๐ฯ,๐ฮฝ) and a scalar ฮธ such that

$e^{[\mathcal{S}]\theta} = \begin{pmatrix}R & p\\o & 1\end{pmatrix}$

And as we saw before, the matrix

$[\mathcal{S}]\theta = \begin{pmatrix}[\mathcal{S}_{\omega}]\theta & \mathcal{S}_v\theta\\o & 0\end{pmatrix} \in se(3)$

is called the matrix logarithm of T = (R,p).

To solve the inverse problem, we follow the following algorithm:

Given (R,p) written as T โ SE(3), find a ฮธ โ [0,ฯ] and a screw axis ๐ = (๐ฯ,๐ฮฝ) โ โsuch that e[๐]ฮธ = T. The vector ๐ฮธ โ โ6 comprises the exponential coordinates for T, and the matrix [๐]ฮธ โ se(3) is the matrix logarithm of T.

(a) If R = I then set ๐ฯ = 0 and ๐ฮฝ = p/||p|| and ฮธ = ||p||.

(b) Otherwise, use the matrix logarithm on SO(3) that we learned in the exponential coordinates for rotations lesson to determine ๐ฯ (= ฯฬ ) and ฮธ for R. The ๐ฮฝ is calculated as ๐ฮฝ = G-1(ฮธ)p where G-1(ฮธ) = 1/ฮธ I โ 1/2[๐ฯ] + (1/ฮธ โ 1/2 cotฮธ/2)[๐ฯ]2.

Note that every single-degree-of-freedom joint (revolute joint, a prismatic joint, and a helical joint) of a robot that we talked about in the degrees of freedom lesson has a joint axis defined by a screw axis, and thus, we can conclude that the matrix exponential and the logarithm can be used to study the robot kinematics as we will see in the coming lessons:

Now letโs see some examples that use all the knowledge that we have learned thus far to find solutions.

### Example: Homogenous Transformation Matrix to Exponential Coordinates of Motion

Suppose that the configuration of the body frame relative to the space frame is as the following figure:

In which the origin of the {b} frame is at (3,0,0) in terms of the space frame coordinates. The configuration of the {b} frame relative to the {s} frame, as we learned in the lesson about the homogenous transformation matrices, can be found using the transformation matrix Tsb as:

$T_{sb} = \begin{pmatrix}0 & -1 & 0 & 3\\0 & 0 & -1 & 0\\1 & 0 & 0 & 0\\0 & 0 & 0 & 1\end{pmatrix}$

We want to find the screw motion (the screw axis ๐ and the amount of traveled distance ฮธ about the screw axis) that can generate the same configuration.

Since the orientation of the body frame is not the same as the orientation of the space frame, then we have a rotational motion. Using the approach we learned in the lesson about the exponential coordinates of orientation for the matrix logarithm of rotations, we can easily find the unit axis and the amount of rotation about this axis that can produce the given orientation as:

$1+2c_{\theta} = r_{11} + r_{22} + r_{33} = 0 \rightarrow \theta = 120^{o} = 2.093 rad$

$\begin{split}[\hat{\omega}] & = \frac{1}{2sin\theta}(R-R^T)\\ & = \frac{1}{\sqrt 3} \begin{pmatrix}0 & -1 & -1\\1 & 0 & -1\\1 & 1 & 0\end{pmatrix}\end{split} \rightarrow \hat{\omega} = \frac{1}{\sqrt 3} \begin{pmatrix}1\\-1\\1\end{pmatrix}$

So, a rotation of 120o about the unit axis calculated above will create the same orientation. Now, using the second approach to calculate the screw axis, we can say that the

$\mathcal{S}_{\omega} = \hat{\omega} = \frac{1}{\sqrt 3}\begin{pmatrix}1\\-1\\1\end{pmatrix}$

And

$\begin{split}\mathcal{S}_v & = G^{-1}(\theta)p \\ & = (\frac{1}{\theta}I โ \frac{1}{2} [\mathcal{S}_{\omega}] + (\frac{1}{\theta} -\frac{1}{2}cot\frac{\theta}{2} )[\mathcal{S}_{\omega}]^2)p\\ & = \begin{pmatrix}1.055\\-1.055\\-0.677\end{pmatrix}\end{split}$

And thus the screw axis can be defined as:

$\mathcal{S} = \begin{pmatrix}\mathcal{S}_{\omega}\\\mathcal{S}_v\end{pmatrix} = \begin{pmatrix}\frac{1}{\sqrt 3}\\-\frac{1}{\sqrt 3}\\\frac{1}{\sqrt 3}\\1.055\\-1.055\\-0.6769\end{pmatrix}$

Therefore, a screw motion about the screw axis ๐ calculated above with the amount of ฮธ calculated earlier produces the same configuration defined by the homogenous transformation matrix Tsb.

For more practice, letโs find the {q,ล,h} representation of the screw axis and draw it. Since we have rotational motion, then we use the equations for the first case and can calculate the screw axis parameters as:

$\begin{matrix}\hat{s} = \mathcal{S}_{\omega} = 0.5774\begin{pmatrix}1\\-1\\1\end{pmatrix}\\h = \frac{{\mathcal{S}_{\omega}^T} v}{||\omega||} = 0.8275\\q = \begin{pmatrix}1\\1\\0\end{pmatrix}\end{matrix}$

Note that q is not unique and the calculated q is only one feasible answer that can be calculated solving the equation v = -ลฮธฬรq + hลฮธฬ. Therefore, the screw axis can be visualized as:

Now letโs see another example.

### Example: Screw Motion Corresponding to a Given Twist

We want to find and visualize the screw axis which if followed at a specific rate will correspond to the given twist ๐ฑ = (0,2,2,4,0,0).

From the screw representation of a twist, we can write:

$\mathcal{V} = \begin{pmatrix}0\\2\\2\\4\\0\\0\end{pmatrix} = \mathcal{S}\dot{\theta}$

Since the rotational part is not zero, we also have rotational motion and we should normalize the twist using the norm of the angular velocity:

$\mathcal{V} = 2\sqrt{2}\begin{pmatrix}0\\1/\sqrt{2}\\1/\sqrt{2}\\2/\sqrt{2}\\0\\0\end{pmatrix}$

Therefore, it is easy to see that the rate ฮธฬ = 2.828 and the screw axis is equal to:

$\mathcal{S} = \begin{pmatrix}0\\0.7071\\0.7071\\1.4142\\0\\0\end{pmatrix}$

Therefore the {q,ล,h} representation of the screw axis can easily be calculated as:

$\begin{matrix}\hat{s} = \mathcal{S}_{\omega} = \begin{pmatrix}0\\0.7071\\0.7071\\\end{pmatrix}\\h = 0\\q = \begin{pmatrix}0\\1\\-1\\\end{pmatrix}\end{matrix}$

And therefore, the screw axis can be visualized as:

Since the screw pitch is zero, the motion is pure rotation with no translational motion about the screw axis. Therefore, a screw motion about the above screw axis by the rate of ฮธฬ calculated above can produce the given twist (๐ฮธฬ).

### Example: Exponential Coordinates of Motion to Homogenous Transformation Matrix

In this example, we want to go backward and find the homogenous transformation matrix corresponding to the given exponential coordinates of the motion.

Suppose that the exponential coordinates of the motion are given by the following matrix:

$\mathcal{S} \theta = \begin{pmatrix}0\\1\\2\\3\\0\\0\end{pmatrix}$

In order to find the homogenous transformation matrix representing the same configuration, we should find the matrix exponential corresponding to the exponential coordinates. Since the upper matrix part is not zero, we have rotational motion and thus the rotational part of the screw axis should be normalized. Thus we can write:

$\mathcal{S} \theta = \sqrt 5 \begin{pmatrix}0\\\frac{1}{\sqrt 5}\\\frac{2}{\sqrt 5}\\\frac{3}{\sqrt 5}\\0\\0\end{pmatrix} \rightarrow \theta = 2.23 rad = 128^{o}, \mathcal{S} = \begin{pmatrix}0\\\frac{1}{\sqrt 5}\\\frac{2}{\sqrt 5}\\\frac{3}{\sqrt 5}\\0\\0\end{pmatrix}$

From the screw axis that we calculated, it will be easy to calculate the matrix exponential of the motion through the following process:

$\mathcal{S}_{\omega} = \begin{pmatrix}0\\0.447\\0.8944\end{pmatrix} \rightarrow [\mathcal{S}_{\omega}] = \begin{pmatrix}0 & -0.8944 & 0.447\\0.8944 & 0 & 0\\-0.447 & 0 & 0\end{pmatrix}$

And using the Rodriguesโ formula that we learned in the lesson about the exponential coordinates of orientation, we can find the rotational part of the transformation matrix as:

$\begin{split}e^{[\mathcal{S}_{\omega}]\theta } & = I + sin\theta [\mathcal{S}_{\omega}] + (1-cos\theta) [\mathcal{S}_{\omega}]^2 \\ & = \begin{pmatrix}-0.6121 & -0.7070 & 0.3533\\0.7070 & -0.2899 & 0.6447\\-0.3533 & 0.6447 & 0.6778\end{pmatrix}\end{split}$

And the linear part can be calculated as

$\begin{split}G(\theta){\mathcal{S}_{v}} & = (I\theta + (1-cos\theta)[\mathcal{S}_{\omega}]+(\theta โ sin\theta)[\mathcal{S}_{\omega}]^2)\mathcal{S}_{v}\\ & = \begin{pmatrix}0.7908 & -1.4422 & 0.7208\\1.4422 & 1.0785 & 0.5755\\-0.7208 & 0.5755 & 1.9424\end{pmatrix}\begin{pmatrix}1.345\\0\\0\end{pmatrix}\\& = \begin{pmatrix}1.0637\\1.9398\\-0.9695\end{pmatrix}\end{split}$

Therefore the homogenous transformation matrix representing the same configuration can be calculated as:

$T_{sb} = e^{[\mathcal{S}]\theta} \underbrace{T_{sb}(0)}_{=I} = \begin{pmatrix}-0.6121 & -0.7070 & 0.3533 & 1.0637\\0.7070 & -0.2899 & 0.6447 & 1.9398\\-0.3533 & 0.6447 & 0.6778 & -0.9695\\0 & 0 & 0 & 1\end{pmatrix}$

This homogenous transformation matrix represents the same configuration as the configuration of the frame after going through a screw motion about the defined screw axis. The initial configuration is the identity matrix since the {b} frame is initially coincident with the frame {s}.

Now letโs see how we can find the body frameโs final configuration after traveling a distance ฮธ along the screw axis ๐ if the screw axis is defined in the space or the body frame.

## Body Frameโs Final Configuration After Travelling along the Screw Axis Defined in the Space or the Body Frame

Suppose that the space frame {s} and the body frame {b} are configured in space as the following figure:

The configuration of the body frame relative to the space frame can be found using the matrix Tsb. We would like to know the body frameโs final configuration, Tsbโ if it travels a distance ฮธ along the screw axis ๐. We would have two cases since ๐ can be represented in either {b} or {s} frame.

• If the screw axis ๐ is expressed in the {b} frame then the final configuration of the body frame can be calculated using the equation Tsbโ = Tsb e[๐b]ฮธ. In this case, the transformation matrix representation of the {b} frame relative to the {s} frame, Tsb, is post-multiplied by the matrix exponential.
• If the screw axis ๐ is expressed in the {s} frame then the final configuration of the body frame can be calculated using the equation Tsbโ = e[๐s]ฮธ Tsb. In this case, the transformation matrix representation of the {b} frame relative to the {s} frame, Tsb, is pre-multiplied by the matrix exponential.

Thatโs going to wrap up todayโs lesson. We hope that it gave you a good understanding of screws in robotics. In the next lesson, we will talk about forces in robotics. Stay Tuned! See you in the next lesson!

The video version of the current lesson can be watched at the link below:

Thanks for reading this post. You can also find the other posts on the Fundamentals of Robotics Course in the link below.

References:
Textbooks:
Modern Robotics: Mechanics, Planning, and Control by Frank Park and Kevin Lynch
A Mathematical Introduction to Robotic Manipulation by Murray, Lee, and Sastry