⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 get.m

📁 it is a matlab file foe develop SLAM localization this is a toolbox for develop develop realtime e
💻 M
字号:
%GET    Get method for differential drive robot object.%   V = GET(R,'PropertyName') returns the value of the specified%   property for the differential drive robot object R.%%   GET(R) displays all property names and their current values%   for the differential drive robot object R.%%   Examples:%      state = get(r,'x');% %   See also: ROBOTDD/SET.% Copyright (c) 2004, CAS-KTH. See licence file for more info.% v.1.0, Nov. 2003, Kai Arrasfunction val = get(varargin);switch nargin,  case 1,    r = varargin{1};    if (isa(r,'robotdd'))      get(r.robot);      disp(sprintf('          X = [%s  %s  %s]', num2str(r.x(1)), ...        num2str(r.x(2)), num2str(r.x(3))));      disp(sprintf('          C = [%s  %s  %s; %s  %s  %s; %s  %s  %s]', ...        num2str(r.C(1,1)), num2str(r.C(1,2)), num2str(r.C(1,3)), ...        num2str(r.C(2,1)), num2str(r.C(2,2)), num2str(r.C(2,3)), ...        num2str(r.C(3,1)), num2str(r.C(3,2)), num2str(r.C(3,3))));      disp(sprintf('         Rl = [%s]', num2str(r.rl)));      disp(sprintf('         Rr = [%s]', num2str(r.rr)));      disp(sprintf('          B = [%s]', num2str(r.b)));   else      error('robotdd/get: Wrong argument type')    end;  case 2,    r = varargin{1};    prop_name = varargin{2};    switch lower(prop_name),      case 'type',        val = get(r.robot,'type');      case 'id',        val = get(r.robot,'id');      case 'name',        val = get(r.robot,'name');      case {'x', 'state'},        val = r.x;      case 'c',        val = r.C;      case 'b',        val = r.b;      case 'rl',        val = r.rl;      case 'rr',        val = r.rr;      case 'formtype',        val = get(r.robot,'formtype');      case {'timestamp', 'time'},        val = get(r.robot,'timestamp');      otherwise        error([prop_name,' is not a valid robot object property']);    end;  otherwise    error('robotdd/get: Wrong number of input arguments')end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -