#include <player_agent.h>
rcsc::PlayerAgentに対する継承グラフ
Public メソッド | |
PlayerAgent () | |
create internal modules | |
virtual | ~PlayerAgent () |
virtual destructor | |
const PlayerConfig & | config () const |
get configuration set | |
DebugClient & | debugClient () |
get debug client interface | |
const WorldModel & | world () const |
get worldmodel | |
const ActionEffector & | effector () const |
get action effector | |
const BodySensor & | bodySensor () const |
get body sensor | |
const VisualSensor & | visualSensor () const |
get visual sensor | |
const AudioSensor & | audioSensor () const |
get audio sensor | |
const FullstateSensor & | fullstateSensor () const |
get fullstate sensor | |
const SeeState & | seeState () const |
get see state | |
const TimeStamp & | bodyTimeStamp () const |
get time stamp when sense_body message is received | |
const TimeStamp & | seeTimeStamp () const |
get time stamp of see message when see message is received | |
bool | doKick (const double &power, const AngleDeg &rel_dir) |
register kick command | |
bool | doDash (const double &power) |
register dash command | |
bool | doTurn (const AngleDeg &moment) |
register turn command | |
bool | doCatch () |
register catch command. catch direction is automatically calculated. | |
bool | doMove (const double &x, const double &y) |
register move command | |
bool | doTackle (const double &power_or_dir) |
register tackle command | |
bool | doTurnNeck (const AngleDeg &moment) |
register turn_neck command. | |
bool | doChangeView (const ViewWidth &width) |
register change_view command. | |
bool | doPointto (const double &x, const double &y) |
register say command. register pointto command. | |
bool | doPointtoOff () |
register pointto command. turn off mode | |
bool | doAttentionto (SideID side, const int unum) |
register attentionto command by off mode | |
bool | doAttentiontoOff () |
register attentionto command. turn off mode | |
void | setArmAction (ArmAction *act) |
reserve pointto action | |
void | setNeckAction (NeckAction *act) |
reserve turn neck action | |
void | setViewAction (ViewAction *act) |
reserve change view action | |
void | addSayMessage (const SayMessage *message) |
add say message to the action effector | |
bool | removeSayMessage (const char header) |
remove the registered say message if exist | |
void | setIntention (SoccerIntention *intention) |
set intention object | |
bool | doIntention () |
execute queued intention if exist. | |
void | finalize () |
finalize all things when program quits | |
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 | |
void | addSayMessageParser (boost::shared_ptr< SayMessageParser > parser) |
register new say message parser object | |
void | removeSayMessageParser (const char header) |
remove registered parser object | |
void | setFreeformParser (boost::shared_ptr< FreeformParser > parser) |
set new freeform message parser | |
virtual void | actionImpl ()=0 |
pure virtual method. register body action to ActionEffector. | |
virtual void | communicationImpl () |
virtual method. register say action to ActionEffector | |
virtual void | outputDebug () |
output debug messages to file or debug server | |
virtual void | handleServerParam () |
this method is called just after analyzing server_param message. | |
virtual void | handlePlayerParam () |
this method is called just after analyzing player_param message. | |
virtual void | handlePlayerType () |
this method is called just after analyzing player_type message. | |
Protected 変数 | |
PlayerConfig | M_config |
configuration parameter set | |
DebugClient | M_debug_client |
debug client interface | |
WorldModel | M_worldmodel |
mental memory of world status | |
ActionEffector | M_effector |
action info manager |
const PlayerConfig& rcsc::PlayerAgent::config | ( | ) | const [inline] |
get configuration set
DebugClient& rcsc::PlayerAgent::debugClient | ( | ) | [inline] |
const WorldModel& rcsc::PlayerAgent::world | ( | ) | const [inline] |
get worldmodel
const ActionEffector& rcsc::PlayerAgent::effector | ( | ) | const [inline] |
get action effector
const BodySensor & rcsc::PlayerAgent::bodySensor | ( | ) | const |
get body sensor
const VisualSensor & rcsc::PlayerAgent::visualSensor | ( | ) | const |
get visual sensor
const AudioSensor & rcsc::PlayerAgent::audioSensor | ( | ) | const |
get audio sensor
const FullstateSensor & rcsc::PlayerAgent::fullstateSensor | ( | ) | const |
get fullstate sensor
const SeeState & rcsc::PlayerAgent::seeState | ( | ) | const |
get see state
const TimeStamp & rcsc::PlayerAgent::bodyTimeStamp | ( | ) | const |
get time stamp when sense_body message is received
const TimeStamp & rcsc::PlayerAgent::seeTimeStamp | ( | ) | const |
get time stamp of see message when see message is received
bool rcsc::PlayerAgent::doKick | ( | const double & | power, | |
const AngleDeg & | rel_dir | |||
) |
register kick command
power | command argument kick power | |
rel_dir | command argument kick direction relative to body angle |
bool rcsc::PlayerAgent::doDash | ( | const double & | power | ) |
register dash command
power | command argument dash power |
bool rcsc::PlayerAgent::doTurn | ( | const AngleDeg & | moment | ) |
register turn command
moment | command argument moment |
bool rcsc::PlayerAgent::doCatch | ( | ) |
register catch command. catch direction is automatically calculated.
bool rcsc::PlayerAgent::doMove | ( | const double & | x, | |
const double & | y | |||
) |
register move command
x | move target x | |
y | move target y |
bool rcsc::PlayerAgent::doTackle | ( | const double & | power_or_dir | ) |
register tackle command
power_or_dir | command argument tackle power or direction |
bool rcsc::PlayerAgent::doTurnNeck | ( | const AngleDeg & | moment | ) |
register turn_neck command.
moment | command argument moment |
bool rcsc::PlayerAgent::doChangeView | ( | const ViewWidth & | width | ) |
register change_view command.
width | new view width |
bool rcsc::PlayerAgent::doPointto | ( | const double & | x, | |
const double & | y | |||
) |
register say command. register pointto command.
x | target point x | |
y | target point y |
bool rcsc::PlayerAgent::doPointtoOff | ( | ) |
register pointto command. turn off mode
bool rcsc::PlayerAgent::doAttentionto | ( | SideID | side, | |
const int | unum | |||
) |
register attentionto command by off mode
side | target player's side | |
unum | target player's uniform number |
bool rcsc::PlayerAgent::doAttentiontoOff | ( | ) |
register attentionto command. turn off mode
void rcsc::PlayerAgent::setArmAction | ( | ArmAction * | act | ) |
reserve pointto action
act | pointer to the action. must be a dynamically allocated object. |
void rcsc::PlayerAgent::setNeckAction | ( | NeckAction * | act | ) |
reserve turn neck action
act | pointer to the action. must be a dynamically allocated object. |
void rcsc::PlayerAgent::setViewAction | ( | ViewAction * | act | ) |
reserve change view action
act | pointer to the action. must be a dynamically allocated object. |
void rcsc::PlayerAgent::addSayMessage | ( | const SayMessage * | message | ) |
add say message to the action effector
message | pointer to the say mesage builder. this must be a dynamically allocated object. |
bool rcsc::PlayerAgent::removeSayMessage | ( | const char | header | ) |
remove the registered say message if exist
header | message header character |
void rcsc::PlayerAgent::setIntention | ( | SoccerIntention * | intention | ) |
set intention object
intention | pointer to the intention. this must be a dynamically allocated object. |
bool rcsc::PlayerAgent::doIntention | ( | ) |
execute queued intention if exist.
true | if action is executed | |
false | if queue is empty, or action is failed. |
bool rcsc::PlayerAgent::initImpl | ( | CmdLineParser & | cmd_parser | ) | [protected, virtual] |
analyze command line options
cmd_parser | command line parser object |
rcsc::SoccerAgentを実装しています。
bool rcsc::PlayerAgent::handleStart | ( | ) | [protected, virtual] |
handle start event
rcsc::SoccerAgentを実装しています。
void rcsc::PlayerAgent::handleMessage | ( | ) | [protected, virtual] |
handle server message event
This method is called from BasicClient::run() method. Do NOT call this method by yourself!
rcsc::SoccerAgentを実装しています。
void rcsc::PlayerAgent::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 milliseconds since last sensory message. This method is called from BasicClient::run() method. Do NOT call this method by yourself! |
rcsc::SoccerAgentを実装しています。
void rcsc::PlayerAgent::addSayMessageParser | ( | boost::shared_ptr< SayMessageParser > | parser | ) | [protected] |
register new say message parser object
parser | pointer to the say mesage parser. |
void rcsc::PlayerAgent::removeSayMessageParser | ( | const char | header | ) | [protected] |
remove registered parser object
header | say message header character |
void rcsc::PlayerAgent::setFreeformParser | ( | boost::shared_ptr< FreeformParser > | parser | ) | [protected] |
set new freeform message parser
parser | pointer to the freeform message parser. |
virtual void rcsc::PlayerAgent::actionImpl | ( | ) | [protected, pure virtual] |
pure virtual method. register body action to ActionEffector.
This method is used to set player's action. This method is called from action(). So, do *NOT* call this method by yourself.
virtual void rcsc::PlayerAgent::communicationImpl | ( | ) | [inline, protected, virtual] |
virtual method. register say action to ActionEffector
This method is called just after doTurnNeck() in decideAction(); This method is used to set player's action. So, do *not* call this method by yourself.
void rcsc::PlayerAgent::outputDebug | ( | ) | [protected, virtual] |
output debug messages to file or debug server
This method is called in decideAction() and after send command. So, do *not* call this method by yourself.