クラス rcsc::TrainerAgent

basic trainer agent class [詳細]

#include <trainer_agent.h>

rcsc::TrainerAgentに対する継承グラフ

rcsc::SoccerAgent すべてのメンバ一覧

Public メソッド

 TrainerAgent ()
 initialize member variables
virtual ~TrainerAgent ()
 delete dynamic allocated memory
const TrainerConfigconfig () const
 get configuration set
const GlobalWorldModelworld () const
 get field status
const GlobalVisualSensorvisualSensor () const
 get the analyzed visual info
void finalize ()
 finalize program process
bool doCheckBall ()
 send check_ball command
bool doLook ()
 send look command
bool doTeamNames ()
 send team_name command
bool doEye (bool on)
 send eye command on if true, send (eye on), else (eye off)
bool doEar (bool on)
 send ear command on if true, send (ear on), else (ear off)
bool doKickOff ()
 send start command to kickoff the game
bool doMoveBall (const Vector2D &pos, const Vector2D &vel)
 send ball move command
bool doMovePlayer (const std::string &teamname, const int unum, const Vector2D &pos)
 send player move command
bool doMovePlayer (const std::string &teamname, const int unum, const Vector2D &pos, const AngleDeg &angle)
 send player move command
bool doRecover ()
 send recover command
bool doChangeMode (const PlayMode mode)
 send playmode change command
bool doChangePlayerType (const std::string &teamname, const int unum, const int type)
 send change_player_type command
bool doSay (const std::string &msg)
 send say command (coach language)

Protected メソッド

virtual bool initImpl (CmdLineParser &cmd_parser)
 analyze command line options
virtual bool handleStart ()
 handle start event
virtual void handleMessage ()
 handle server message event
virtual void handleTimeout (const int timeout_count, const int waited_msec)
 handle timeout event
virtual void handleExit ()
 handle exit event
virtual void actionImpl ()=0
 pure virtual method. register decision.

Protected 変数

TrainerConfig M_config
 configuration parameter set
GlobalWorldModel M_worldmodel
 internal memory of field status

説明

basic trainer agent class


関数

const TrainerConfig& rcsc::TrainerAgent::config (  )  const [inline]

get configuration set

戻り値:
const reference to the configuration class object

const GlobalWorldModel& rcsc::TrainerAgent::world (  )  const [inline]

get field status

戻り値:
const reference to the worldmodel instance

const GlobalVisualSensor & rcsc::TrainerAgent::visualSensor (  )  const

get the analyzed visual info

戻り値:
const reference to the visual sensor instance

bool rcsc::TrainerAgent::initImpl ( CmdLineParser cmd_parser  )  [protected, virtual]

analyze command line options

引数:
cmd_parser command line parser object
戻り値:
only if "help" option is given, false is returned.
This method is called from SoccerAgent::init( argc, argv ) SoccerAgent::init(argc,argv) should be called in main(). Do NOT call this method by yourself!

rcsc::SoccerAgentを実装しています。

bool rcsc::TrainerAgent::handleStart (  )  [protected, virtual]

handle start event

戻り値:
status of start procedure.
This method is called on the top of BasicClient::run() method. The concrete agent must connect to the server and send init command. Do NOT call this method by yourself!

rcsc::SoccerAgentを実装しています。

void rcsc::TrainerAgent::handleMessage (  )  [protected, virtual]

handle server message event

Do NOT call this method by yourself!

rcsc::SoccerAgentを実装しています。

void rcsc::TrainerAgent::handleTimeout ( const int  timeout_count,
const int  waited_msec 
) [protected, virtual]

handle timeout event

引数:
timeout_count count of timeout without sensory message.
waited_msec elapsed milli seconds sinc last sensory message.
This method is called when select() timeout occurs Do NOT call this method by yourself!

rcsc::SoccerAgentを実装しています。

bool rcsc::TrainerAgent::doCheckBall (  ) 

send check_ball command

戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doLook (  ) 

send look command

戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doTeamNames (  ) 

send team_name command

戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doEye ( bool  on  ) 

send eye command on if true, send (eye on), else (eye off)

戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doEar ( bool  on  ) 

send ear command on if true, send (ear on), else (ear off)

戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doKickOff (  ) 

send start command to kickoff the game

戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doMoveBall ( const Vector2D pos,
const Vector2D vel 
)

send ball move command

引数:
pos new position
vel new velocity
戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doMovePlayer ( const std::string &  teamname,
const int  unum,
const Vector2D pos 
)

send player move command

引数:
teamname target player's team name
unum target player's uniform number
pos new position
戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doMovePlayer ( const std::string &  teamname,
const int  unum,
const Vector2D pos,
const AngleDeg angle 
)

send player move command

引数:
teamname target player's team name
unum target player's uniform number
pos new position
angle new body angle
戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doRecover (  ) 

send recover command

戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doChangeMode ( const PlayMode  mode  ) 

send playmode change command

引数:
mode new playmode Id
戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doChangePlayerType ( const std::string &  teamname,
const int  unum,
const int  type 
)

send change_player_type command

引数:
teamname target player's team name
unum target player's uniform number
type new player type Id
戻り値:
true if command is generated and sent

bool rcsc::TrainerAgent::doSay ( const std::string &  msg  ) 

send say command (coach language)

戻り値:
true if command is generated and sent

virtual void rcsc::TrainerAgent::actionImpl (  )  [protected, pure virtual]

pure virtual method. register decision.

This method is used to set trainer's action. This method is called from action(). So, do *NOT* call this method by yourself.


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:28 2008に生成されました。  doxygen 1.5.0