# 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):

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:

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:

ฯ 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:

๐_{ฯ} 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:

ฮธฬ = ||ฯ|| 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:

ฮธฬ = ||ฮฝ|| 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):

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:

๐_{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:

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

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

And as we saw before, the matrix

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 T_{sb} as:

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:

So, a rotation of 120^{o} 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

And

And thus the screw axis can be defined as:

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 T_{sb}.

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:

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:

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:

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

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

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:

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:

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

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:

And the linear part can be calculated as

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

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 T_{sb}. 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 T
_{sbโ}= T_{sb}e^{[๐}_{b}^{]ฮธ}. In this case, the transformation matrix representation of the {b} frame relative to the {s} frame, T_{sb}, 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 T
_{sbโ}= e^{[๐}_{s}^{]ฮธ}T_{sb}. In this case, the transformation matrix representation of the {b} frame relative to the {s} frame, T_{sb}, 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