FRICTION Compute friction torque on the LINK object TAU = FRICTION(LINK, QD) Return the friction torque on the link moving at speed QD. Depending on fields in the LINK object viscous and/or Coulomb friction are computed. SEE ALSO: ROBOT/FRICTION
0001 %FRICTION Compute friction torque on the LINK object 0002 % 0003 % TAU = FRICTION(LINK, QD) 0004 % 0005 % Return the friction torque on the link moving at speed QD. Depending 0006 % on fields in the LINK object viscous and/or Coulomb friction 0007 % are computed. 0008 % 0009 % SEE ALSO: ROBOT/FRICTION 0010 0011 % Copyright (C) 1999-2008, by Peter I. Corke 0012 % 0013 % This file is part of The Robotics Toolbox for Matlab (RTB). 0014 % 0015 % RTB is free software: you can redistribute it and/or modify 0016 % it under the terms of the GNU Lesser General Public License as published by 0017 % the Free Software Foundation, either version 3 of the License, or 0018 % (at your option) any later version. 0019 % 0020 % RTB is distributed in the hope that it will be useful, 0021 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0022 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0023 % GNU Lesser General Public License for more details. 0024 % 0025 % You should have received a copy of the GNU Leser General Public License 0026 % along with RTB. If not, see <http://www.gnu.org/licenses/>. 0027 0028 function tau = friction(l, qd) 0029 tau = 0.0; 0030 0031 qd = qd(:); 0032 tau = l.B * qd; 0033 0034 tau = tau + (qd > 0) * l.Tc(1) + (qd < 0) * l.Tc(2);