Home > . > coriolis.m

coriolis

PURPOSE ^

CORIOLIS Compute the manipulator Coriolis matrix

SYNOPSIS ^

function c = coriolis(robot, q, qd)

DESCRIPTION ^

CORIOLIS Compute the manipulator Coriolis matrix

     C = CORIOLIS(ROBOT, Q, QD)

 Returns the n element Coriolis/centripetal torque vector at the specified 
 pose and velocity.
 ROBOT is a robot object and describes the manipulator dynamics and 
 kinematics.

 If Q and QD are row vectors, CORIOLIS(ROBOT,Q,QD) is a row vector 
 of joint torques.
 If Q and QD are matrices, each row is interpretted as a joint state 
 vector, and CORIOLIS(ROBOT,Q,QD) is a matrix each row being the 
 corresponding joint %    torques.

 See also: ROBOT, RNE, ITORQUE, GRAVLOAD.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %CORIOLIS Compute the manipulator Coriolis matrix
0002 %
0003 %     C = CORIOLIS(ROBOT, Q, QD)
0004 %
0005 % Returns the n element Coriolis/centripetal torque vector at the specified
0006 % pose and velocity.
0007 % ROBOT is a robot object and describes the manipulator dynamics and
0008 % kinematics.
0009 %
0010 % If Q and QD are row vectors, CORIOLIS(ROBOT,Q,QD) is a row vector
0011 % of joint torques.
0012 % If Q and QD are matrices, each row is interpretted as a joint state
0013 % vector, and CORIOLIS(ROBOT,Q,QD) is a matrix each row being the
0014 % corresponding joint %    torques.
0015 %
0016 % See also: ROBOT, RNE, ITORQUE, GRAVLOAD.
0017 
0018 
0019 % Copyright (C) 1993-2008, by Peter I. Corke
0020 %
0021 % This file is part of The Robotics Toolbox for Matlab (RTB).
0022 %
0023 % RTB is free software: you can redistribute it and/or modify
0024 % it under the terms of the GNU Lesser General Public License as published by
0025 % the Free Software Foundation, either version 3 of the License, or
0026 % (at your option) any later version.
0027 %
0028 % RTB is distributed in the hope that it will be useful,
0029 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0030 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0031 % GNU Lesser General Public License for more details.
0032 %
0033 % You should have received a copy of the GNU Leser General Public License
0034 % along with RTB.  If not, see <http://www.gnu.org/licenses/>.
0035 
0036 function c = coriolis(robot, q, qd)
0037 
0038     if nargin == 3,
0039         c = rne(robot, q, qd, zeros(size(q)), [0;0;0]);
0040     else
0041         n = length(q);
0042         c = [];
0043         qd = zeros(1,n);
0044         for i=1:n,
0045             qd(i) = 1;
0046             C = coriolis(robot, q, qd);
0047             qd(i) = 0;
0048             c(:,i) = C';
0049         end
0050     end

Generated on Sun 15-Feb-2009 18:09:29 by m2html © 2003