📄 serversettings.h
字号:
/*Copyright (c) 2000-2003, Jelle Kok, University of AmsterdamAll rights reserved.Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice, thislist of conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentationand/or other materials provided with the distribution.3. Neither the name of the University of Amsterdam nor the names of itscontributors may be used to endorse or promote products derived from thissoftware without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*//*! \file ServerSettings.h<pre><b>File:</b> ServerSettings.h<b>Project:</b> Robocup Soccer Simulation Team: UvA Trilearn<b>Authors:</b> Jelle Kok<b>Created:</b> 28/11/2000<b>Last Revision:</b> $ID$<b>Contents:</b> Header file for class ServerSettings. It contains all the member data and member method declarations of the ServerSettings class. This class contains all the Soccerserver parameters that are available in the configuration files 'server.conf' and 'player.conf' along with their default values and standard set- and get methods for manipulating these values. This file also contains the definition of the HeteroPlayerSettings class which contains all the SoccerServer parameters which together define a heterogeneous player type.</pre><hr size=2><pre><h2><b>Changes</b></h2><b>Date</b> <b>Author</b> <b>Comment</b>28/11/2000 Jelle Kok Initial version (based on Emiel Corten)31/01/2001 Remco de Boer Settings for server version 7.xx added27/04/2001 Remco de Boer add drop_ball_time and player.conf parameters 01/05/2001 Remco de Boer Version including full documentation completed07/05/2001 Jelle Kok HeteroPlayerSettings class and dExtraStamina08/05/2001 Remco de Boer Documentation updated</pre>*/#ifndef _SERVERSETTINGS_#define _SERVERSETTINGS_#include "GenericValues.h"/*****************************************************************************//******************* CLASS SERVERSETTINGS ********************************//*****************************************************************************//*! This class contains all the Soccerserver parameters that are available in the configuration file 'server.conf' along with their default values and standard set- and get methods for manipulating these values. The ServerSettings class is a subclass of the GenericValues class and therefore each value in this class can be reached through the string name of the corresponding parameter. */class ServerSettings:public GenericValues{private: // private member data // all the parameters available in server.conf // NOTE: names in server.conf corresponding with member variables // are listed between doxygen-tags to enable quick searching // goal-related parameters double dGoalWidth; /*!< goal_width: the width of the goal */ // player-related parameters double dPlayerSize; /*!< player_size: the size (=radius) of a player */ double dPlayerDecay; /*!< player_decay: player speed decay per cycle */ double dPlayerRand; /*!< player_rand: random error in player movement*/ double dPlayerWeight; /*!< player_weight: weight of a player (for wind)*/ double dPlayerSpeedMax; /*!< player_speed_max: maximum speed of a player */ double dPlayerAccelMax; /*!< player_accel_max: maximum acceleration of a player per cycle */ // stamina-related parameters double dStaminaMax; /*!< stamina_max: maximum stamina of a player */ double dStaminaIncMax; /*!< stamina_inc_max: maximum stamina increase of a player per cycle */ double dRecoverDecThr; /*!< recover_dec_thr: percentage of stamina_max below which player recovery decreases */ double dRecoverDec; /*!< recover_dec: decrement step per cycle for player recovery */ double dRecoverMin; /*!< recover_min: minimum player recovery */ double dEffortDecThr; /*!< effort_dec_thr: percentage of stamina_max below which player effort capacity decreases*/ double dEffortDec; /*!< effort_dec: decrement step per cycle for player effort capacity */ double dEffortIncThr; /*!< effort_incr_thr: percentage of stamina_max above which player effort capacity increases*/ double dEffortInc; /*!< effort_inc: increment step per cycle for player effort capacity */ double dEffortMin; /*!< effort_min: minimum value for player effort */ double dEffortMax; /*!< effort_max: maximum player effort capacity */ // parameters related to auditory perception int iHearMax; /*!< hear_max: maximum hearing capacity of a plyer a player can hear hear_inc messages in hear_decay simulation cycles */ int iHearInc; /*!< hear_inc: minimum hearing capacity of a player i.e. the number of messages a player can hear in hear_decay simulation cycles */ int iHearDecay; /*!< hear_decay: decay rate of player hearing capacity, i.e. minimum number of cycles for hear_inc messages */ // parameters related to player turn actions double dInertiaMoment; /*!< inertia_moment: inertia moment of a player; affects actual turn angle depending on speed*/ // parameters related to sense_body information int iSenseBodyStep; /*!< sense_body_step: length of the interval (ms) between sense_body information messages */ // goalkeeper-related parameters double dCatchableAreaL; /*!< catchable_area_l: length of area around goalkeeper in which he can catch the ball */ double dCatchableAreaW; /*!< catchable_area_w: width of area around goalkeeper in which he can catch the ball */ double dCatchProbability; /*!< catch_probability: the probability for a goalkeeper to catch the ball */ int iCatchBanCycle; /*!< catch_ban_cycle: number of cycles after catch in which goalkeeper cannot catch again */ int iGoalieMaxMoves; /*!< goalie_max_moves: maximum number of 'move' actions allowed for goalkeeper after catch */ // ball-related parameters double dBallSize; /*!< ball_size: the size (=radius) of the ball */ double dBallDecay; /*!< ball_decay: ball speed decay per cycle */ double dBallRand; /*!< ball_rand: random error in ball movement */ double dBallWeight; /*!< ball_weight: weight of the ball (for wind) */ double dBallSpeedMax; /*!< ball_speed_max: maximum speed of the ball */ double dBallAccelMax; /*!< ball_accel_max: maximum acceleration of the ball per cycle */ // wind-related parameters double dWindForce; /*!< wind_force: the force of the wind */ double dWindDir; /*!< wind_dir: the direction of the wind */ double dWindRand; /*!< wind_rand: random error in wind direction */ bool bWindRandom; /*!< wind_random: random wind force and direction*/ // parameters related to 'dash' and 'kick' commands double dKickableMargin; /*!< kickable_margin: margin around player in which ball is kickable; kickable area thus equals kickable_margin + ball_size + player_size */ double dCkickMargin; /*!< ckick_margin: corner kick margin, i.e. the minimum distance to the ball for offending players when a corner kick is taken */ double dDashPowerRate; /*!< dash_power_rate: rate by which the 'Power' argument in a 'dash' command is multiplied (thus determining the amount of displacement of the player as a result of the 'dash') */ double dKickPowerRate; /*!< kick_power_rate: rate by which the 'Power' argument in a 'kick' command is multiplied (thus determining the amount of displacement of the ball as a result of the 'kick') */ double dKickRand; /*!< kick_rand: random error in kick direction */ // parameters related to visual and auditory perception range double dVisibleAngle; /*!< visible_angle: angle of the view cone of a player in the standard view mode */ double dAudioCutDist; /*!< audio_cut_dist: maximum distance over which a spoken message can be heard */ // quantization parameters double dQuantizeStep; /*!< quantize_step: quantization step for distance of moving objects */ double dQuantizeStepL; /*!< quantize_step_l: quantization step for distance of landmarks */ // range parameters for basic actuator commands int iMaxPower; /*!< maxpower: maximum power for dash/kick */ int iMinPower; /*!< minpower: minimum power for dash/kick */ int iMaxMoment; /*!< maxmoment: maximum angle for turn/kick */ int iMinMoment; /*!< minmoment: minimum angle for turn/kick */ int iMaxNeckMoment; /*!< maxneckmoment: maximum angle for turnneck */ int iMinNeckMoment; /*!< minneckmoment: minimum angle for turnneck */ int iMaxNeckAng; /*!< maxneckang: maximum neck angle rel. to body */ int iMinNeckAng; /*!< minneckang: minimum neck angle rel. to body */ // port-related parameters int iPort; /*!< port: port number for player connection */ int iCoachPort; /*!< coach_port: port number for coach connection*/ int iOlCoachPort; /*!< ol_coach_port: port number for online coach */ // coach-related parameters int iSayCoachCntMax; /*!< say_coach_cnt_max: maximum number of coach messages possible */ int iSayCoachMsgSize; /*!< say_coach_msg_size: maximum size of coach messages */ int iClangWinSize; /*!< clang_win_size: time window which controls how many coach messages can be sent */ int iClangDefineWin; /*!< clang_define_win: number of define messages by coach per time window */ int iClangMetaWin; /*!< clang_meta_win: number of meta messages by coach per time window */ int iClangAdviceWin; /*!< clang_advice_win: number of advice messages by coach per time window */ int iClangInfoWin; /*!< clang_info_win: number of info messages by coach per time window */ int iClangMessDelay; /*!< clang_mess_delay: delay of coach messages, ie the number of cycles between send to player and receival of message */ int iClangMessPerCycle;/*!< clang_mess_per_cycle: number of coach messages per cycle */ int iSendViStep; /*!< send_vi_step: interval of coach's look, i.e. the length of the interval (in ms) between visual messages to the coach */ // time-related parameters int iSimulatorStep; /*!< simulator_step: the length (in ms) of a simulator cycle */ int iSendStep; /*!< send_step: the length of the interval (in ms) between visual messages to a player in the standard view mode */ int iRecvStep; /*!< recv_step: the length of the interval (in ms) for accepting commands from a player */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -