Robot Mechanics and Control Robot Mechanics and Control

Example 6.3:: Transferring a Wrench (MATLAB)

Transferring a Wrench

This example illustrates how to transfer a wrench from one coordinate frame to another.

Contents

Clear All Workspace Objects and Reset All Assumptions

clear all

Given Wrench $^{A}\overline{\mathbf W}_{A}$

WAResA = [0; 5; 0; 0; 0; 10]; % [Force (N), Moment (N-cm)]

The homogeneous transformation from $O_{A}{\mathrm -}xyz$ to $O_{B}{\mathrm -}xyz$.

TAToB = [0 0 1  0;
         1 0 0 -3;
         0 1 0 -6;
         0 0 0  1];

% Extract the rotation matrix and the position vector from T_AToB.

Extract the rotation matrix ${\mathbf R}_{A}^{B}$ and the position vector $^{B}{\mathbf X}_{A/B}$ from ${\mathbf T}_{A}^{B}$.

RAToB = TAToB(1:3,1:3)
XARelBResB = TAToB(1:3,4)
RAToB =

     0     0     1
     1     0     0
     0     1     0


XARelBResB =

     0
    -3
    -6

Create the cross product operator $[\boldmath{X}]$.

XCross = [ 0             -XARelBResB(3)  XARelBResB(2);
           XARelBResB(3)  0             -XARelBResB(1);
          -XARelBResB(2)  XARelBResB(1)  0           ]

% Form the transfer matrix.
XCross =

     0     6    -3
    -6     0     0
     3     0     0

Form the wrench coordinate transfer matrix ${\mathbf \Lambda}_{A}^{B}$.

LambdaAToB = [RAToB         zeros(3);
              XCross*RAToB  RAToB  ]
LambdaAToB =

     0     0     1     0     0     0
     1     0     0     0     0     0
     0     1     0     0     0     0
     6    -3     0     0     0     1
     0     0    -6     1     0     0
     0     0     3     0     1     0

Wrench transferred from $O_{A}{\mathrm -}xyz$ to $O_{B}{\mathrm -}xyz$.

WBResB = LambdaAToB*WAResA
WBResB =

     0
     0
     5
    -5
     0
     0

This MATLAB example illustrates a computation from the textbook Fundamentals of Robot Mechanics by G. L. Long, Quintus-Hyperion Press, 2015. See http://www.RobotMechanicsControl.info for other relevant files.