LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
player_config.h
Go to the documentation of this file.
1// -*-c++-*-
2
8/*
9 *Copyright:
10
11 Copyright (C) Hidehisa AKIYAMA
12
13 This code is free software; you can redistribute it and/or
14 modify it under the terms of the GNU Lesser General Public
15 License as published by the Free Software Foundation; either
16 version 3 of the License, or (at your option) any later version.
17
18 This library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public
24 License along with this library; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
27 *EndCopyright:
28 */
29
31
32#ifndef RCSC_PLAYER_PLAYER_CONFIG_H
33#define RCSC_PLAYER_PLAYER_CONFIG_H
34
35#include <string>
36#include <iosfwd>
37
38namespace rcsc {
39
40class ParamMap;
41class ParamParser;
42
48private:
49
50 ParamMap * M_param_map;
51
52 // basic setting
53
54 std::string M_team_name;
55 double M_version;
56 int M_reconnect_number;
57 bool M_goalie;
58
59 int M_interval_msec;
60 int M_server_wait_seconds;
61
63 int M_wait_time_thr_synch_view;
65 int M_wait_time_thr_nosynch_view;
66
68 int M_normal_view_time_thr;
69
70 std::string M_rcssserver_host;
71 int M_rcssserver_port;
72
73 int M_compression;
74
75 int M_clang_min;
76 int M_clang_max;
77
78 bool M_use_communication;
79 bool M_hear_opponent_audio;
80 int M_audio_shift;
81
82 bool M_use_fullstate;
83 bool M_debug_fullstate;
84
85 bool M_synch_see;
86
87 // confidence value
88
89 int M_self_pos_count_thr;
90 int M_self_vel_count_thr;
91 int M_self_face_count_thr;
92
93 int M_ball_pos_count_thr;
94 int M_ball_rpos_count_thr;
95 int M_ball_vel_count_thr;
96
97 int M_player_pos_count_thr;
98 int M_player_vel_count_thr;
99 int M_player_face_count_thr;
100
101
103 int M_player_number;
104
106 std::string M_config_dir;
107
108 //
109 // debug
110 //
111
112 bool M_debug;
113
115 std::string M_log_dir;
116
117 //
118 // debug client settings
119 //
120
121 bool M_debug_server_connect;
122 bool M_debug_server_logging;
123
124 std::string M_debug_server_host;
125 int M_debug_server_port;
126
127 //
128 // offline client settings
129 //
130
131 bool M_offline_logging;
132 std::string M_offline_log_ext;
133
135 int M_offline_client_number;
136
137 //
138 // debug logging
139 //
140
141 int M_debug_start_time;
142 int M_debug_end_time;
143
144 std::string M_debug_log_ext;
145
146 bool M_debug_system;
147 bool M_debug_sensor;
148 bool M_debug_world;
149 bool M_debug_action;
150 bool M_debug_intercept;
151 bool M_debug_kick;
152 bool M_debug_hold;
153 bool M_debug_dribble;
154 bool M_debug_pass;
155 bool M_debug_cross;
156 bool M_debug_shoot;
157 bool M_debug_clear;
158 bool M_debug_block;
159 bool M_debug_mark;
160 bool M_debug_positioning;
161 bool M_debug_role;
162 bool M_debug_plan;
163 bool M_debug_team;
164 bool M_debug_communication;
165 bool M_debug_analyzer;
166 bool M_debug_action_chain;
167
168 bool M_debug_training;
169
170public:
171
176
181
186 void parse( ParamParser & parser );
187
193 std::ostream & printHelp( std::ostream & os ) const;
194
195protected:
200
205
206public:
207
208 // basic settings
209
214 const std::string & teamName() const { return M_team_name; }
215
220 double version() const { return M_version; }
221
226 int reconnectNumber() const { return M_reconnect_number; }
227
232 bool goalie() const { return M_goalie; }
233
238 int intervalMSec() const { return M_interval_msec; }
239
244 int serverWaitSeconds() const { return M_server_wait_seconds; }
245
250 int waitTimeThrSynchView() const { return M_wait_time_thr_synch_view; }
251
256 int waitTimeThrNoSynchView() const { return M_wait_time_thr_nosynch_view; }
257
262 int normalViewTimeThr() const { return M_normal_view_time_thr; }
263
268 const std::string & host() const { return M_rcssserver_host; }
269
274 int port() const { return M_rcssserver_port; }
275
280 int compression() const { return M_compression; }
281
286 int clangMin() const { return M_clang_min; }
287
292 int clangMax() const { return M_clang_max; }
293
298 bool useCommunication() const { return M_use_communication; }
299
304 bool hearOpponentAudio() const { return M_hear_opponent_audio; }
305
306 /*
307 \brief shift value to encrypt audio encoder
308 \return shift value
309 */
310 int audioShift() const { return M_audio_shift; }
311
316 bool useFullstate() const { return M_use_fullstate; }
317
322 bool debugFullstate() const { return M_debug_fullstate; }
323
328 bool synchSee() const { return M_synch_see; }
329
330 // confidence value
331
336 int selfPosCountThr() const { return M_self_pos_count_thr; }
337
342 int selfVelCountThr() const { return M_self_vel_count_thr; }
343
348 int selfFaceCountThr() const { return M_self_face_count_thr; }
349
354 int ballPosCountThr() const { return M_ball_pos_count_thr; }
355
360 int ballRPosCountThr() const { return M_ball_rpos_count_thr; }
361
366 int ballVelCountThr() const { return M_ball_vel_count_thr; }
367
372 int playerPosCountThr() const { return M_player_pos_count_thr; }
373
378 int playerVelCountThr() const { return M_player_vel_count_thr; }
379
384 int playerFaceCountThr() const { return M_player_face_count_thr; }
385
390 int playerNumber() const { return M_player_number; }
391
396 void setPlayerNumber( const int num ) { M_player_number = num; }
397
402 const std::string & configDir() const { return M_config_dir; }
403
404 //
405 // debug
406 //
407
412 bool debug() const { return M_debug; }
413
418 const std::string & logDir() const { return M_log_dir; }
419
420 //
421 // debug server settings
422 //
423
428 bool debugServerConnect() const { return M_debug_server_connect; }
429
434 bool debugServerLogging() const { return M_debug_server_logging; }
435
440 const std::string & debugServerHost() const { return M_debug_server_host; }
441
446 int debugServerPort() const { return M_debug_server_port; }
447
448 //
449 // offline client
450 //
451
456 bool offlineLogging() const { return M_offline_logging; }
457
462 const std::string & offlineLogExt() const { return M_offline_log_ext; }
463
469 int offlineClientNumber() const { return M_offline_client_number; }
470
471 //
472 // debug logging
473 //
474
479 int debugStartTime() const { return M_debug_start_time; }
480
485 int debugEndTime() const { return M_debug_end_time; }
486
491 const std::string & debugLogExt() const { return M_debug_log_ext; }
492
497 bool debugSystem() const { return M_debug_system; }
498
503 bool debugSensor() const { return M_debug_sensor; }
504
509 bool debugWorld() const { return M_debug_world; }
510
515 bool debugAction() const { return M_debug_action; }
516
521 bool debugIntercept() const { return M_debug_intercept; }
522
527 bool debugKick() const { return M_debug_kick; }
528
533 bool debugHold() const { return M_debug_hold; }
534
539 bool debugDribble() const { return M_debug_dribble; }
540
545 bool debugPass() const { return M_debug_pass; }
546
551 bool debugCross() const { return M_debug_cross; }
552
557 bool debugShoot() const { return M_debug_shoot; }
558
563 bool debugClear() const { return M_debug_clear; }
564
569 bool debugBlock() const { return M_debug_block; }
570
575 bool debugMark() const { return M_debug_mark; }
576
581 bool debugPositioning() const { return M_debug_positioning; }
582
587 bool debugRole() const { return M_debug_role; }
588
593 bool debugPlan() const { return M_debug_plan; }
594
599 bool debugTeam() const { return M_debug_team; }
600
601
606 bool debugCommunication() const { return M_debug_communication; }
607
608
613 bool debugAnalyzer() const { return M_debug_analyzer; }
614
619 bool debugActionChain() const { return M_debug_action_chain; }
620
625 bool debugTraining() const { return M_debug_training; }
626};
627
628}
629
630#endif
parameter container
Definition: param_map.h:484
abstract parameter paraser class
Definition: param_parser.h:43
player configuration variable set
Definition: player_config.h:47
const std::string & host() const
get the server host name string
Definition: player_config.h:268
int selfVelCountThr() const
get the self velocity accuracy count threshold
Definition: player_config.h:342
bool debugPlan() const
get the debug flag
Definition: player_config.h:593
bool debugServerConnect() const
get the debug flag whether debug information is sent to a debug server
Definition: player_config.h:428
int waitTimeThrNoSynchView() const
get the maximum time to wait see message for asynch view mode
Definition: player_config.h:256
const std::string & logDir() const
get the debug log directory path string.
Definition: player_config.h:418
bool debugRole() const
get the debug flag
Definition: player_config.h:587
int clangMax() const
get the maximum clang version to be sent
Definition: player_config.h:292
bool debugTeam() const
get the debug flag
Definition: player_config.h:599
int playerFaceCountThr() const
get the other player face angle accuracy count threshold
Definition: player_config.h:384
bool debugBlock() const
get the debug flag
Definition: player_config.h:569
bool debugAnalyzer() const
get the debug flag
Definition: player_config.h:613
bool debugIntercept() const
get the debug flag
Definition: player_config.h:521
int ballRPosCountThr() const
get the ball relative position accuracy count threshold
Definition: player_config.h:360
bool debugCross() const
get the debug flag
Definition: player_config.h:551
bool offlineLogging() const
get the switch for offline logging. this value is ignored if client runs in offline clinet mode.
Definition: player_config.h:456
bool debug() const
get the debug flag
Definition: player_config.h:412
const std::string & debugServerHost() const
get the debug server host name string
Definition: player_config.h:440
int playerNumber() const
get the player number (not a uniform number)
Definition: player_config.h:390
bool debugPositioning() const
get the debug flag
Definition: player_config.h:581
const std::string & teamName() const
get the team name string
Definition: player_config.h:214
int clangMin() const
get the minimum clang version to be sent
Definition: player_config.h:286
bool debugServerLogging() const
get the debug flag whether debug information is written to files
Definition: player_config.h:434
bool debugWorld() const
get the debug flag
Definition: player_config.h:509
int selfFaceCountThr() const
get the self face angle accuracy count threshold
Definition: player_config.h:348
bool debugKick() const
get the debug flag
Definition: player_config.h:527
PlayerConfig()
init variables by default value. create ParamMap instance
bool debugCommunication() const
get the debug flag
Definition: player_config.h:606
int debugStartTime() const
get the start time for receoding the debug log
Definition: player_config.h:479
bool useFullstate() const
get the fullstate mode flag that determines whether the world model is updated by fullstate informati...
Definition: player_config.h:316
void setDefaultParam()
set default value
bool debugPass() const
get the debug flag
Definition: player_config.h:545
int selfPosCountThr() const
get the self position accuracy count threshold
Definition: player_config.h:336
int intervalMSec() const
get the interrupt interval for decision making
Definition: player_config.h:238
bool debugAction() const
get the debug flag
Definition: player_config.h:515
bool goalie() const
get the goalie flag
Definition: player_config.h:232
bool debugSensor() const
get the debug flag
Definition: player_config.h:503
bool debugFullstate() const
get the switch variable thate determines whether a fullstate world model for debugging is used or not...
Definition: player_config.h:322
int waitTimeThrSynchView() const
get the maximum time to wait see message for synch view mode
Definition: player_config.h:250
bool synchSee() const
get the synch_see mode flag
Definition: player_config.h:328
bool debugDribble() const
get the debug flag
Definition: player_config.h:539
int playerVelCountThr() const
get the other player position accuracy count threshold
Definition: player_config.h:378
int ballPosCountThr() const
get the ball position accuracy count threshold
Definition: player_config.h:354
int compression() const
get the server message compression level
Definition: player_config.h:280
const std::string & configDir() const
get the configulation directory path
Definition: player_config.h:402
int normalViewTimeThr() const
get the threshold time to change to normal view width for old timer synch view mode
Definition: player_config.h:262
void setPlayerNumber(const int num)
set a player number (not a uniform number)
Definition: player_config.h:396
const std::string & offlineLogExt() const
get the offline client log file extention string.
Definition: player_config.h:462
bool debugActionChain() const
get the debug flag
Definition: player_config.h:619
~PlayerConfig()
delete ParamMap instance
bool debugShoot() const
get the debug flag
Definition: player_config.h:557
const std::string & debugLogExt() const
get the debug log file extention string.
Definition: player_config.h:491
void parse(ParamParser &parser)
set parameter values using param parser instance
bool hearOpponentAudio() const
get the auditory sensor mode flag for opponent
Definition: player_config.h:304
double version() const
get the client version
Definition: player_config.h:220
bool debugTraining() const
get the debug flag
Definition: player_config.h:625
std::ostream & printHelp(std::ostream &os) const
print help message to the output stream
int playerPosCountThr() const
get the other player position accuracy count threshold
Definition: player_config.h:372
bool debugMark() const
get the debug flag
Definition: player_config.h:575
int port() const
get the server port number
Definition: player_config.h:274
int debugEndTime() const
get the end time for receoding the debug log
Definition: player_config.h:485
int debugServerPort() const
get the debug server port number
Definition: player_config.h:446
bool useCommunication() const
get the communication mode flag
Definition: player_config.h:298
int reconnectNumber() const
get the uniform numver for a reconnect command
Definition: player_config.h:226
int offlineClientNumber() const
get the uniform number for offline client mode. 1-11 means offline mode, other values mean online mod...
Definition: player_config.h:469
bool debugClear() const
get the debug flag
Definition: player_config.h:563
int ballVelCountThr() const
get the ball velocity accuracy count threshold
Definition: player_config.h:366
int serverWaitSeconds() const
get the maximum time to wait server response
Definition: player_config.h:244
bool debugHold() const
get the debug flag
Definition: player_config.h:533
void createParamMap()
set parameter entries
bool debugSystem() const
get the debug flag
Definition: player_config.h:497