function copy_demo(copyTarget) %COPY_DEMO Copies all demo executable to target robot. % % COPY_DEMO(TURTLE) copies the demo executables to TURTLE. Valid values for % TURTLE are 'turtle#', where 1 <= # <= MAX_TURTLES, or a combination of % multiple numbers. E.g. 'turtle135' copies the executable to turtle1, % turtle3 and turtle5. %% INIT cd /home/robocup/svn/trunk/src/Turtle2 if nargin==0 error('specify a turtle: e.g.: ''copy_worldmodel turtle1'''); else ButtonName = questdlg('What field are you using?', ... 'Field question', ... 'TU/e field', 'demo field', 'ASML field', 'TU/e field'); switch ButtonName, case 'TU/e field', fld='TUE_field'; case 'demo field', fld='Demofield'; case 'ASML field', fld='ASML_field'; end % switch if isempty(ButtonName), error('Choose a field!'); end end if length(copyTarget)<7 || ~strcmp(copyTarget(1:6),'turtle'), error('Wrong syntax for the input!') end %% SHOW ROBOT TARGETS turtleNrs = copyTarget(7:end); %display tgt = 'turtle'; if length(turtleNrs)>1, tgt = [tgt, 's']; end for i1=1:length(turtleNrs), if (i1>1) && (length(turtleNrs)==i1), tgt = [tgt, ' and']; elseif i1>1, tgt = [tgt, ',']; end tgt=[tgt, ' ', num2str(turtleNrs(i1))]; end disp(['selected turtles: ', tgt]); %% COPYING disp(sprintf('\nCOPY ALL EXECUTABLES')) %motion cd Motion; motion_success = copy_motion(copyTarget,fld); %motion cd ../Strategy; strategy_success = copy_strategy(copyTarget,fld); %vision disp(' ') cd ../Vision; vision_success = copy_vision(copyTarget,fld); %worldmodel disp(' ') cd ../WorldModel; worldmodel_success = copy_worldmodel(copyTarget,fld); cd ..; copysummary(motion_success,strategy_success,vision_success,worldmodel_success);