FTRANS Transform force/moment FT = FTRANS(T, F) Transforms a force/moment F in the base frame to FT in the frame T. F and FT are 6-vectors of the form [Fx Fy Fz Mx My Mz] SEE ALSO: DIFF2TR
0001 %FTRANS Transform force/moment 0002 % 0003 % FT = FTRANS(T, F) 0004 % 0005 % Transforms a force/moment F in the base frame to FT in the frame T. 0006 % F and FT are 6-vectors of the form [Fx Fy Fz Mx My Mz] 0007 % 0008 % SEE ALSO: DIFF2TR 0009 0010 % Copyright (C) 1999-2008, by Peter I. Corke 0011 % 0012 % This file is part of The Robotics Toolbox for Matlab (RTB). 0013 % 0014 % RTB is free software: you can redistribute it and/or modify 0015 % it under the terms of the GNU Lesser General Public License as published by 0016 % the Free Software Foundation, either version 3 of the License, or 0017 % (at your option) any later version. 0018 % 0019 % RTB is distributed in the hope that it will be useful, 0020 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0021 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0022 % GNU Lesser General Public License for more details. 0023 % 0024 % You should have received a copy of the GNU Leser General Public License 0025 % along with RTB. If not, see <http://www.gnu.org/licenses/>. 0026 0027 function Ft = ftrans(T, F) 0028 0029 f = F(1:3); m = F(4:6); 0030 k = cross(f, transl(T) ) + m; 0031 0032 mt = rot(T)' * k; 0033 ft = rot(T)' * F(1:3); 0034 0035 Ft = [ft; mt];