% % setparameters - sets turtle specific parameters % N.B.: especially note that also the greenfield monitor computerbox should % be set % % usage: setparameters(turtle) % % turtle - turtle id. Valid values are 'turtleX' where 1 <= X <= MAX_TURTLES. % %% @file % sets turtle specific parameters % % usage: setparameters(turtle) % @param turtle - turtle id. Valid values are 'turtleX' where 1 <= X <= MAX_TURTLES. % @return none function setparameters(turtle) if nargin==0 error('specify a turtle: e.g.: ''setparameters turtle1'''); elseif nargin==1 try % % take care of wired / wireless option % turtletempname=turtle; if isequal(turtletempname(end),'w') turtletempname=turtletempname(1:end-2); end % Add pathnames that contain function we might need now % or later the S-functions addpathrobocup evalin('base','clear host_bot coach_bot svr_vision_port svr_motion_port'); evalin('base','global host_bot coach_bot svr_vision_port svr_motion_port'); % % specifying the computers and ports % % get ip-adresses [s, w]=system('hostname'); w=w(1:end-1); evalin('base',['coachbot =''' w ''';']); % what is the coach? turtlelocal=sprintf('hostbot =''%s'';',turtle); evalin('base',turtlelocal); % what is the host? turtlelocal2=sprintf('hostbottemp =''%s'';',turtletempname); evalin('base',turtlelocal2); % what is the host? % don't change: evalin('base','localhost = ''127.0.0.1'';'); evalin('base','coach_bot = get_bot_id(coachbot);'); % to get IP evalin('base','host_bot = get_bot_id(hostbot);'); % to get IP evalin('base','greenfield_monitor = get_bot_id(''devpc7'');'); % to get IP evalin('base','host_bot_idnr = str2num(hostbottemp(end));') % robot number to identify to coach % port used for network data send and receive evalin('base','port_network_sendreceive = 9000 + host_bot_idnr*100;'); evalin('base','port_network_sendreceive_2 = 9002 + host_bot_idnr*100;'); evalin('base','port_network_sendreceive_3 = 9003 + host_bot_idnr*100;'); % port for video network send and receive evalin('base','network_video_sendreceive_1 = 9004 + host_bot_idnr*100;'); evalin('base','network_video_sendreceive_2 = 9005 + host_bot_idnr*100;'); evalin('base','Vision_To_Strategy = 9006 + host_bot_idnr*100;'); evalin('base','Strategy_To_Vision = 9007 + host_bot_idnr*100;'); evalin('base','Vision_To_Coach_Port = 9008 + host_bot_idnr*100;'); % port on which the image server and client work, don't change for optimal camera settings GA algortihm evalin('base','port_imageserver = 9009 + host_bot_idnr*100;'); %evalin('base','port_imageserver = 9009 + host_bot_idnr*100;'); %to make by the hammer % port on which the vision part runs evalin('base','port_vision_mdl = 9010 + host_bot_idnr*100;'); evalin('base','port_motion_mdl = 9011 + host_bot_idnr*100;'); evalin('base','svr_vision_port = 9012 + host_bot_idnr*100;'); evalin('base','svr_motion_port = 9013 + host_bot_idnr*100;'); % For simulation environment evalin('base','simulation_motion_port = 9014 + host_bot_idnr*100;'); evalin('base','simulation_vision_port = 9015 + host_bot_idnr*100;'); % port for greenfield network send and receive evalin('base','port_greenfield_sendreceive = 9016 + host_bot_idnr*100;'); % in show_greenfield these are hardcoded, so don't change % ports for parameter tuning evalin('base','port_vision_tuning = 9017 + host_bot_idnr*100;'); evalin('base','port_motion_tuning = 9018 + host_bot_idnr*100;'); % port for manual joystick control evalin('base','port_manual_drive = 9019 + host_bot_idnr*100;'); % port for refboxsim network send and receive evalin('base','port_refboxsim_sendreceive = 9020 + host_bot_idnr*100;'); % in refboxsim these are hardcoded, so don't change evalin('base','port_refbox_sendreceive = 9021 + host_bot_idnr*100;'); % For connection with PaderKickers team server (fixed!) evalin('base','paderkicker_teamserver_port = 2998;'); %temporarily overruling evalin('base','svr_vision_port = 8009;'); evalin('base','svr_motion_port = 8010;'); evalin('base','port_vision_mdl = 17726;'); evalin('base','port_motion_mdl = 17725;'); evalin('base','Vision_To_Greenfield_Port = 11100;'); catch disp(lasterr) end end