Robot Mechanics and Control Robot Mechanics and Control

Example 6.2:: A Wrench on a Screw (MATLAB)

A Wrench on a Screw

This example illustrates how to find an applied wrench at a given location on a rigid body.

Contents

Clear All Workspace Objects and Reset All Assumptions

clear all

Given Forces and Moments

F1 = [0; 0; 5]; % N
F2 = [0; 6; 0]; % N
M1 = [0; 0; -7]; % N-cm
M2 = [0; -8; 0]; % N-cm

a) The Resultant Force, Resultant Moment, and Wrench at $P_{A}$

X1RelA = [0; 3; -2]; % cm
X2RelA = [8; 0; 0]; % cm

F = F1 + F2
MA = cross(X1RelA, F1) + cross(X2RelA, F2) + M1 + M2

WA = [F; MA]
F =

     0
     6
     5


MA =

    15
    -8
    41


WA =

     0
     6
     5
    15
    -8
    41

b) The Screw Coordinates and the Pitch

S = F/norm(F) % [unitless]
SOA = MA/norm(F) % [cm]
ScrewA = [S; SOA] % [unitless; cm]

h = dot(S, SOA)/sqrt(dot(S, S))
S =

         0
    0.7682
    0.6402


SOA =

    1.9206
   -1.0243
    5.2495


ScrewA =

         0
    0.7682
    0.6402
    1.9206
   -1.0243
    5.2495


h =

    2.5738

c) The Vector Location of $P_{B}$ relative to $P_{A}$:

MPar = dot(MA, S)*S
MPerp = MA - MPar

d = norm(MPerp)/norm(F)
ud = cross(F, MPerp)/norm(cross(F, MPerp))

XBRelA = d*ud

h_check = norm(MPar)/norm(F)
MPar =

         0
   15.4426
   12.8689


MPerp =

   15.0000
  -23.4426
   28.1311


d =

    5.0666


ud =

    0.9254
    0.2427
   -0.2912


XBRelA =

    4.6885
    1.2295
   -1.4754


h_check =

    2.5738

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.