Home > arte3.2.0 > RAPID > init_sim_variables.m

init_sim_variables

PURPOSE ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SYNOPSIS ^

function robot = init_sim_variables(robot)

DESCRIPTION ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   INIT_SIM_VARIABLES initializes the variables needed
   during the simulations

    See also LOAD_ROBOT

   Author: Arturo Gil. Universidad Miguel Hernández de Elche. email:
   arturo.gil@umh.es date:   02/01/2012
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0002 %   INIT_SIM_VARIABLES initializes the variables needed
0003 %   during the simulations
0004 %
0005 %    See also LOAD_ROBOT
0006 %
0007 %   Author: Arturo Gil. Universidad Miguel Hernández de Elche. email:
0008 %   arturo.gil@umh.es date:   02/01/2012
0009 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0010 
0011 % Copyright (C) 2012, by Arturo Gil Aparicio
0012 %
0013 % This file is part of ARTE (A Robotics Toolbox for Education).
0014 %
0015 % ARTE 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 % ARTE 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 ARTE.  If not, see <http://www.gnu.org/licenses/>.
0027 function robot = init_sim_variables(robot)
0028 
0029 robot.debug=0;
0030 
0031 %POSITION, velocity and acceleration
0032 robot.q= zeros(robot.DOF, 1);
0033 robot.qd=zeros(robot.DOF, 1);
0034 robot.qdd=zeros(robot.DOF, 1);
0035 robot.time = [];
0036 
0037 robot.q_vector=[];
0038 robot.qd_vector=[];
0039 robot.qdd_vector=[];
0040 
0041 robot.last_target=directkinematic(robot, robot.q);
0042 robot.last_zone_data = 'fine';
0043 
0044 robot.tool0=[];
0045 robot.tool0=[1,[[0,0,0]/1000,[1,0,0,0]],[0.1,[0,0,0],[1,0,0,0],0,0,0]];
0046 robot.wobj0=[];
0047 
0048 %This is used of end tools
0049 % for example, for a gripper, tool_activated grabs the piece
0050 robot.tool_activated=0;
0051 
0052 %save robot path
0053 robot.path = pwd;

Generated on Fri 03-Jan-2014 12:20:01 by m2html © 2005