Ground-plane transformation of a measured contact wrench (source code)

= Ground-plane transformation of a measured contact wrench

A <ground-plane transformation of a measured contact wrench> combines a change of coordinate axes with a change of the point about which moments are reported. A six-component <wrench (mechanics)> is incomplete without both pieces of metadata. Drake's primary SpatialForce reference explicitly tracks the application point and expressed-in frame separately from the stored <force> and <torque> values.<SpatialForce class in Drake documentation>[Detailed Description; Shift and ShiftInPlace]{ref}

Let $R$ rotate sensor-frame components into ground-frame components, and let $p$ be the ground-frame vector from ground origin $O$ to sensor origin $S$. For measured <force> $f_S$ and moment $M_S$ about $S$, the equivalent result about $O$ is
$$
f_G=Rf_S,\qquad M_O=RM_S+p\times f_G.
$$
The plus sign uses the stated vector from the new origin to the old one. A shift expressed with the opposite vector uses the opposite sign. The offset and <force> must be expressed in the same axes before taking the <cross product>.

For a planar normal-pressure reconstruction with $f_{G,z}>0$, compute
$$
x_P=-M_{O,y}/f_{G,z},\qquad y_P=M_{O,x}/f_{G,z}.
$$
The special parallel-axis height correction in <center of pressure (terrestrial locomotion)> is recovered with $p=(0,0,h)$ and $R=I$.

For an original rotated-sensor example, use a 90-degree rotation about $z$, sensor readings $f_S=(10,0,100)\,\mathrm N$ and $M_S=(1,2,3)\,\mathrm{N\,m}$, and $p=(0.05,-0.02,0.10)\,\mathrm m$. Rotation gives $f_G=(0,10,100)\,\mathrm N$ and $RM_S=(-2,1,3)\,\mathrm{N\,m}$. The translated moment is $M_O=(-5,-4,3.5)\,\mathrm{N\,m}$, yielding $(x_P,y_P)=(0.040,-0.050)\,\mathrm m$. The yaw moment remaining at that point is $3.1\,\mathrm{N\,m}$, so translating to the centroid does not erase the entire <wrench (mechanics)>.

A bench check applies known loads at known ground locations and repeats after changing sensor orientation. Geometry, tare loads, units and axis signs must all be included. A correct rotation with the wrong moment origin can still give an incorrect <pressure> location; a small normal load also amplifies reconstruction uncertainty.