MANIPLTY Manipulability measure M = MANIPLTY(ROBOT, Q) M = MANIPLTY(ROBOT, Q, WHICH) Computes the manipulability index for the manipulator at the given pose. For an n-axis manipulator Q may be an n-element vector, or an m x n joint space trajectory. If Q is a vector MANIPLTY returns a scalar manipulability index. If Q is a matrix MANIPLTY returns a column vector of manipulability indices for each pose specified by Q. The argument WHICH can be either 'yoshikawa' (default) or 'asada' and selects one of two manipulability measures. Yoshikawa's manipulability measure gives an indication of how far the manipulator is from singularities and thus able to move and exert forces uniformly in all directions. Asada's manipulability measure is based on the manipulator's Cartesian inertia matrix. An n-dimensional inertia ellipsoid X' M(q) X = 1 gives an indication of how well the manipulator can accelerate in each of the Cartesian directions. The scalar measure computed here is the ratio of the smallest/largest ellipsoid axis. Ideally the ellipsoid would be spherical, giving a ratio of 1, but in practice will be less than 1. See also: INERTIA, JACOB0.
0001 %MANIPLTY Manipulability measure 0002 % 0003 % M = MANIPLTY(ROBOT, Q) 0004 % M = MANIPLTY(ROBOT, Q, WHICH) 0005 % 0006 % Computes the manipulability index for the manipulator at the given pose. 0007 % 0008 % For an n-axis manipulator Q may be an n-element vector, or an m x n 0009 % joint space trajectory. 0010 % 0011 % If Q is a vector MANIPLTY returns a scalar manipulability index. 0012 % If Q is a matrix MANIPLTY returns a column vector of manipulability 0013 % indices for each pose specified by Q. 0014 % 0015 % The argument WHICH can be either 'yoshikawa' (default) or 'asada' and 0016 % selects one of two manipulability measures. 0017 % Yoshikawa's manipulability measure gives an indication of how far 0018 % the manipulator is from singularities and thus able to move and 0019 % exert forces uniformly in all directions. 0020 % 0021 % Asada's manipulability measure is based on the manipulator's 0022 % Cartesian inertia matrix. An n-dimensional inertia ellipsoid 0023 % X' M(q) X = 1 0024 % gives an indication of how well the manipulator can accelerate 0025 % in each of the Cartesian directions. The scalar measure computed 0026 % here is the ratio of the smallest/largest ellipsoid axis. Ideally 0027 % the ellipsoid would be spherical, giving a ratio of 1, but in 0028 % practice will be less than 1. 0029 % 0030 % See also: INERTIA, JACOB0. 0031 0032 % Copyright (C) 1993-2008, by Peter I. Corke 0033 % 0034 % This file is part of The Robotics Toolbox for Matlab (RTB). 0035 % 0036 % RTB is free software: you can redistribute it and/or modify 0037 % it under the terms of the GNU Lesser General Public License as published by 0038 % the Free Software Foundation, either version 3 of the License, or 0039 % (at your option) any later version. 0040 % 0041 % RTB is distributed in the hope that it will be useful, 0042 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0043 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0044 % GNU Lesser General Public License for more details. 0045 % 0046 % You should have received a copy of the GNU Leser General Public License 0047 % along with RTB. If not, see <http://www.gnu.org/licenses/>. 0048 0049 function w = maniplty(robot, q, which) 0050 n = robot.n; 0051 0052 if nargin == 2, 0053 which = 'yoshikawa'; 0054 end 0055 0056 if length(q) == robot.n, 0057 q = q(:)'; 0058 end 0059 0060 w = []; 0061 switch which, 0062 case {'yoshikawa', 'yoshi', 'y'} 0063 for Q = q', 0064 w = [w; yoshi(robot, Q)]; 0065 end 0066 case {'asada', 'a'} 0067 for Q = q', 0068 w = [w; asada(robot, Q)]; 0069 end 0070 end 0071 0072 function m = yoshi(robot, q) 0073 J = jacob0(robot, q); 0074 m = sqrt(det(J * J')); 0075 0076 function m = asada(robot, q) 0077 J = jacob0(robot, q); 0078 Ji = inv(J); 0079 M = inertia(robot, q); 0080 Mx = Ji' * M * Ji; 0081 e = eig(Mx); 0082 m = min(e) / max(e);