rt_ftrans - transform force/moment between coordinate frames[view code]
Transform the generalized force vector F, express in the current coordinate frame, to force vector F2 in the second coordinate frame. The second frame is related to the first by the homogeneous transform T.
// The following example shows how rt_ftrans() can be used to rewrite a // given generalized force vector in terms of a wrench applied at a // different point (and with respect to a different coordinate frame) // by using a direct approach. // given the wrench F applied at the origin // of the World frame F = rand(6,1); // we wish to determine the equivalent wrench // (Fb) applied at the origin of frame B, whose // configuration with respect to the World frame // is Tb = rt_rotz(%pi/4)*rt_transl(0.25,-0.25,0.55), // by compounded transforms Rb = rt_tr2rot(Tb); pb = rt_transl(Tb); pb_hat = [0, -pb(3), pb(2); pb(3), 0, -pb(1); -pb(2), pb(1), 0]; M = [Rb', zeros(3,3); -Rb'*pb_hat, Rb']; Fb = M*F, // by using rt_ftrans() (direct approach) Fb = rt_ftrans(Tb, F),
Corke, P.I. "A Robotics Toolbox for MATLAB", IEEE Robotics and Automation Magazine, Volume 3(1), March 1996, pp. 24-32