Logo
April, 25, 2022

Fundamentals of Robotics: Wrenches

In the previous lesson, we learned that screws are geometric interpretations of twists, and they can be used to express configurations in robotics. This lesson is about spatial forces or wrenches in robotics. We will talk about wrenches in this lesson, which are 6-vector representations of forces and moments in robotics. We will also become familiar with how to change the frame of representation of a wrench. 

This lesson is part of the series of lessons on foundations necessary to express robot motions. For a 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.

Now let’s learn about forces and torques in robotics, which are collectively called wrenches. 

A spatial force (generalized force) or a wrench is a six-vector (a vector in ℝ6) consisting of moments (torques) and forces. Therefore, a wrench consists of a linear component or pure force and an angular component or pure moment acting at a point. If f is a linear force the line of which is acting on a rigid body at a point r, and if we define a reference frame {a}, then as we saw before, the point r can be represented in the reference frame {a} as ra ∈ ℝ3 and the linear force in that reference frame can be represented as fa ∈ ℝ3.

Note that the point r may be a contact point if the force is applied by one of the fingers during robotic grasping, or it will be a different point if the force is due to an external load. 

You may refer to the lesson below to understand how vectors and points are represented with respect to different coordinate frame.

The linear force creates a torque or moment that can be represented as ma ∈ ℝ3 in the {a} frame and can be calculated as the cross product of the distance of the point of application of f to {a} and the force expressed in {a} frame:

\[m_a = r_a \times f_a\]

Note that the point of application of the force along its line of action is immaterial.

By combining the moment and force into a single 6-vector spatial force, we get the wrench expressed in the {a} frame:

\[\mathcal{F}_a = \begin{pmatrix}m_a\\f_a\end{pmatrix} = (m_a,f_a) \in {\mathbb{R}}^6 \quad m_a \in{\mathbb{R}}^3 , f_a \in {\mathbb{R}}^3\]

The 3-vector fa shows the magnitudes of the forces in three directions that induce a 3-vector torque or moment about the frame {a}. A wrench with a zero linear component is called a pure moment.

Let’s now see how we can change the frame of reference for a wrench.

The Relationship Between Wrench Representation in Frame {a} and Wrench Representation in Frame {b}

The values of the wrench vector depend on the coordinate frame in which the force and the moment are represented.

wrenches_changing_frame_of_reference

We can represent a wrench in one frame in another frame if the homogenous transformation matrix Tba is known between the frame {a} and {b}.

To learn more about homogenous transformation matrices and how to calculate them, please refer to the following lesson.

Physics tells us that power generated (or dissipated) by the (wrench, twist) pair must be the same regardless of the frame in which it is represented. Note that the dot product of a spatial force and a twist is called power and it is a coordinate independent quantity (it is the same whether the wrench and twist are represented in frame {b} or in frame {a}):

\[\mathcal{F} . \mathcal{V} =\mathcal{F}^T \mathcal{V} = \mathcal{V}^T \mathcal{F} = \text{power}\]
\[\mathcal{V}_{b}^T {\mathcal{F}_{b}} ={\mathcal{V}_{a}}^T {\mathcal{F}_a}\]

We also know from the velocities in robotics lesson that the adjoint transformation can change the frame of reference for a twist:

\[\mathcal{V}_{a} =[Ad_{T_{ab}}]\mathcal{V}_{b}\]

From the properties of matrix transpose, we can say that the transpose of the multiplication of matrics equals to the multiplication of the transpose of the second matrix and the transpose of the first matrix (AB)T = BTAT, then we can write:

\[{\mathcal{V}_{b}}^T {\mathcal{F}_{b}} ={\mathcal{V}_{b}}^T [Ad_{T_{ab}}]^T\mathcal{F}_{a} \quad \text{must holdfor all }\mathcal{V}_{b}\]

Given a wrench representation in {a}, and in {b}, then the two representations are related by:

\[\mathcal{F}_{b} = (m_b,f_b) = [Ad_{T_{ab}}]^T\mathcal{F}_{a}\\\mathcal{F}_{a} = (m_a,f_a) = [Ad_{T_{ba}}]^T \mathcal{F}_{b}\]

The adjoint transformation changes the coordinate frame of the wrench from the {b} frame to the {a} frame and vice versa.

Note that only the rotation matrix between the frames {a} and {b} is needed to change the coordinate frame of a moment from one reference frame to the other:

\[m_a = R_{ab}m_b\]

If we consider {s} to be the fixed or space frame and {b} to be the body frame then:

\[\mathcal{F}_{s} \quad \text{spatialwrench}\\\mathcal{F}_{b} \quad \text{body wrench}\]

Now let’s see an example.

Example: Wrench Measured by the Robot Wrist’s Six-axis Force/Torque Sensor

Consider, a robotic hand is holding an apple and there is a force/torque sensor on the robot’s wrist.

wrenches_a robot is holding an apple
An apple is held by a robotic hand. Image credit: 7Bot

We know the following information:

  • the mass of the apple
  • direction of gravity
  • location of the apple in the hand

We want to find the forces/torques measured by the sensor.

The figure below shows a schematic of the problem:

wrench measured by a force torque sensor at robot wrist
Coordinate frames for a robot hand holding an apple.

The force/torque sensor measures the forces and torques in the frame {f} and frame {a} is at the center of mass of the apple. We can write the forces and moments in frame {a} as:

\[\mathcal{F}_a = \begin{pmatrix}m_a\\f_a\end{pmatrix} = \begin{pmatrix}0\\0\\0\\0\\-mg\\0\end{pmatrix}\]

Note that the moment vector is zero since the force vector passes through the origin of the {a} frame and does not produce any moment there. mg is the force due to gravity and it is in the opposite direction of the y axis. To transform this wrench to the force sensor coordinate frame, we must calculate the adjoint transformation:

\[\mathcal{F}_f = [Ad_{T_{af}}]^T\mathcal{F}_a\]

The configuration of the force sensor frame {f} relative to the apple frame {a} can be calculated as:

\[T_{af} = \begin{pmatrix}1 & 0 & 0 & -L\\0 & 1 & 0 & 0\\0 & 0 & 1 & 0\\0 & 0 & 0 & 1\end{pmatrix}\]

Then, referring back to the velocities in robotics lesson, we can calculate the adjoint transformation as:

\[[Ad_{T_{af}}]= \begin{pmatrix}R_{af} & o\\ [p_{af}]R_{af} & R_{af}\end{pmatrix} = \begin{pmatrix}I & o\\ [p_{af}] & I\end{pmatrix}\]

The skew-symmetric matrix representation of the position vector can be calculated by referring back to the exponential coordinates lesson as:

\[[p_{af}] = \begin{pmatrix}0 & 0 & 0\\0 & 0 & L\\0 & -L & 0\end{pmatrix}\]

Then, the adjoint function can be written as the following matrix:

\[[Ad_{T_{af}}] = \begin{pmatrix}1 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 0 & 0 & 0\\0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & L & 0 & 1 & 0\\0 & -L & 0 & 0 & 0 & 1\end{pmatrix}\]

and finally, the representation of the wrench in the sensor coordinate frame can be represented as:

\[\mathcal{F}_f = \begin{pmatrix}1 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 0 & 0 & 0\\0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & L & 0 & 1 & 0\\0 & -L & 0 & 0 & 0 & 1\end{pmatrix} \begin{pmatrix}0\\0\\0\\0\\-mg\\0\end{pmatrix} = \begin{pmatrix}0\\0\\-mgL\\0\\-mg\\0\end{pmatrix} = \begin{pmatrix}m_f\\f_f\end{pmatrix}\]

from this matrix, we can see that the wrench creates a moment of -mgL about the z-axis of the {f} frame.

Note that if more than one wrench acts on a rigid body, then the total wrench on the body is equal to the vector sum of the individual wrenches expressed in the same coordinate frame. Let’s see this with two examples.

Example: Wrench Measured by the Robot Wrist’s Six-axis Force/Torque Sensor Considering the Hand’s Weight

Suppose that a robot hand is holding an apple subject to gravity. The apple mass is m1, the gravitational field is g, and the mass of the hand is m2. What are the forces and torques measured by the six-axis force/torque sensor?

The schematic of the problem is as follows:

wrench measured by force torque sensor at robot wrist with hand weight
Coordinate frames for a robot hand holding an apple considering the hand’s weight.

{f}, {h}, and {a} are the force/torque sensor frame, center of mass of the hand frame, and center of mass of the apple frame, respectively.

The gravitational wrench on the hand and expressed in the hand coordinate frame {h} can be expressed as the following vector:

\[\mathcal{F}_h = \begin{pmatrix}0\\0\\0\\0\\-m_2 g\\0\end{pmatrix}\]

and the gravitational wrench on the apple expressed in the apple coordinate frame {a} is:

\[\mathcal{F}_a = \begin{pmatrix}0\\0\\0\\0\\-m_1 g\\0\end{pmatrix}\]

The transformation matrices needed to calculate the adjoint transformations can be written as the following matrices:

\[T_{hf} = \begin{pmatrix}1 & 0 & 0 & -L_1\\0 & 1 & 0 & 0\\0 & 0 & 1 & 0\\0 & 0 & 0 & 1\end{pmatrix}, T_{af} = \begin{pmatrix}1 & 0 & 0 & -(L_1+L_2)\\0 & 1 & 0 & 0\\0 & 0 & 1 & 0\\0 & 0 & 0 & 1\end{pmatrix}\]

then the wrench measured by the six-axis force-torque sensor can be calculated as the vector sum of the individual wrenches expressed in the same coordinate frame:

\[\mathcal{F}_f = [Ad_{T_{hf}}]^T\mathcal{F}_h + [Ad_{T_{af}}]^T\mathcal{F}_a\]

where the adjoint transformations can be calculated as the following matrices:

\[[Ad_{T_{hf}}] = \begin{pmatrix}R_{hf} & o\\ [p_{hf}]R_{hf} & R_{hf}\end{pmatrix} = \begin{pmatrix}I & o\\ [p_{hf}] & I\end{pmatrix}\\ [Ad_{T_{af}}] = \begin{pmatrix}R_{af} & o\\ [p_{af}]R_{af} & R_{af}\end{pmatrix} = \begin{pmatrix}I & o\\ [p_{af}] & I\end{pmatrix}\]
\[[p_{hf}] = \begin{pmatrix}0 & 0 & 0\\0 & 0 & L_1\\0 & -L_1 & 0\end{pmatrix}, [p_{af}] = \begin{pmatrix}0 & 0 & 0\\0 & 0 & L_1+L_2\\0 & -(L_1+L_2) & 0\end{pmatrix}\]

Then the wrench measured by the six-axis force/torque sensor can be expressed as the following vector:

\[\mathcal{F}_f = \begin{pmatrix}0\\0\\-m_1 g (L_1 + L_2) – m_2 g L_1\\0\\-(m_1+m_2)g\\0\end{pmatrix}\]

Let’s see another example.

Example: Total Wrench in The Body Frame for Multifingered Grasping

Consider the multifingered grasping depicted in the figure below:

wrenches_shadow robot grasps an apple
The Shadow dextrous hand holding an apple. Image credit: Shadow Robot

The goal is to determine the net effect of the forces applied at the contact points between the fingers and the object. In other words, we should map these forces to the body frame and add them as vectors. 

The schematic of this problem is shown in the figure below:

wrenches_multifingered grasping schematic
Multifingered grasping schematic.

Fci is the wrench exerted by the ith finger on the grasped object represented in the {ci} frame. The net wrench on the body to determine the net effect of forces applied at the contact points between the fingers and the object, in the body coordinate frame {o} can be found by the vector sum of the individual wrenches expressed in the same coordinate frame:

\[\mathcal{F}_o = \sum [Ad_{T_{c_i o}}]^T\mathcal{F}_{c_i}\]

Let’s see the final example.

Example: Suppose an arm-mounted mobile robot X-Terrabot is moving in a room and wants to pick up an object with body frame {e} with its end-effector with the attached frame {c}:

homogenous-transformations-arm-mounted-mobile-robot-camera-object-logo-mecharithm

In the homogenous transformation matrices lesson, we calculated the configuration of the object relative to the robot’s end-effector as Tce:

\[T_{ce} = \begin{pmatrix}0 & 0 & 1 & -75\\-0.7071 & 0.7071 & 0 & -183.8478\\-0.7071 & -0.7071 & 0 & 113.1371\\0 & 0 & 0 & 1\end{pmatrix}\]

Please refer to that lesson to figure out how we got this matrix. Now suppose that the weight of the block that the robot should pick up is 1 kg. This means that the robot arm should provide approximately 10 N of force in the ẑe direction (the z-direction of the block’s coordinate frame {e}) to compensate for the weight of the block. This force can be expressed as a wrench Fe in the {e} frame as:

\[\mathcal{F}_e = \begin{pmatrix}0\\0\\0\\0\\0\\10\end{pmatrix}\]

Now we want to express this same wrench in the end-effector frame {c} as Fc. By definition that we saw in this lesson, we can write:

\[\mathcal{F}_c = [Ad_{T_{ec}}]^T\mathcal{F}_e\]

Tec can be calculated by inverting the transformation matrix Tce:

\[T_{ec} = {T_{ce}}^{-1} = \begin{pmatrix}0 & -0.7071 & -0.7071 & -50\\0 & 0.7071 & -0.7071 & 210\\1 & 0 & 0 & 75\\0 & 0 & 0 & 1\end{pmatrix}\]

The transpose of the adjoint transformation can be calculated as:

\[[Ad_{T_{ec}}]^T = \begin{pmatrix}R_{ec} & o\\ [p_{ec}]R_{ec} & R_{ec}\end{pmatrix}^T = \begin{pmatrix}0 & 0 & 1 & 210 & 50 & 0\\-0.7071 & 0.7071 & 0 & -53 & -53 & 113.136\\-0.7071 & -0.7071 & 0 & 53 & -53 & 183.846\\0 & 0 & 0 & 0 & 0 & 1\\0 & 0 & 0 & -0.7071 & 0.7071 & 0\\0 & 0 & 0 & -0.7071 & -0.7071 & 0\end{pmatrix}\]

Thus, the wrench in the end-effector frame {c} can be calculated as:

\[\mathcal{F}_c = [Ad_{T_{ec}}]^T\mathcal{F}_e = \begin{pmatrix}0\\1131.4\\1838.5\\10\\0\\0\end{pmatrix}\]
  1. The software accompanying the textbook used to create these lessons consists of functions that can return or calculate several things such as the inverse of the rotation matrix, the skew-symmetric representation of a vector and vice versa, screws, twists, etc. To download the software with documentation, please go to the link below:

Since lesson 1, we have become familiarized with the fundamentals needed to represent motion and forces in 3D space for robots and other types of mechanical systems.

We are now equipped with the tools we need to study the kinematics, statics, and dynamics for robots. In the next lesson, we will start with robot kinematics. Stay Tuned! See you in the next lesson!

References:

  1. Modern Robotics: Mechanics, Planning, and Control by Frank Park and Kevin Lynch
  2. A Mathematical Introduction to Robotic Manipulation by Murray, Lee, and Sastry
  3. https://www.shadowrobot.com/
  4. https://www.kickstarter.com/projects/1128055363/7bot-a-powerful-desktop-robot-arm-for-future-inven