%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Set: Set the specified variable to one. Example: robot = Set(robot, do1); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0002 % Set: 0003 % Set the specified variable to one. 0004 % Example: robot = Set(robot, do1); 0005 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0006 0007 % Copyright (C) 2012, by Arturo Gil Aparicio 0008 % 0009 % This file is part of ARTE (A Robotics Toolbox for Education). 0010 % 0011 % ARTE is free software: you can redistribute it and/or modify 0012 % it under the terms of the GNU Lesser General Public License as published by 0013 % the Free Software Foundation, either version 3 of the License, or 0014 % (at your option) any later version. 0015 % 0016 % ARTE is distributed in the hope that it will be useful, 0017 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0018 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0019 % GNU Lesser General Public License for more details. 0020 % 0021 % You should have received a copy of the GNU Leser General Public License 0022 % along with ARTE. If not, see <http://www.gnu.org/licenses/>. 0023 function Set(variable) 0024 0025 global configuration robot 0026 0027 %robot.variable = 1; 0028 0029 %do1 is assigned to the 0030 if variable=='do1' 0031 T07=directkinematic(robot, robot.q)*robot.tool.TCP; 0032 robot.tool.Trel=inv(T07)*robot.piece.T0; 0033 end 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044