#include <action_effector.h>
Public メソッド | |
ActionEffector (const PlayerAgent &agent) | |
init member variables | |
~ActionEffector () | |
destruct dynamic allocated command objects | |
void | reset () |
reset all command effect. called just before action decision | |
void | incCommandCount (const PlayerCommand::Type type) |
increment command count | |
void | checkCommandCount (const BodySensor &sense) |
compare internal command count with sensed command count | |
std::ostream & | makeCommand (std::ostream &to) |
make command string and update last action time | |
const PlayerBodyCommand * | bodyCommand () const |
get const pointer to the player's body command object | |
const PlayerTurnNeckCommand * | turnNeckCommand () const |
get const pointer to the player's turn_neck command object | |
const PlayerChangeViewCommand * | changeViewCommand () const |
get const pointer to the player's change_view command object | |
const PlayerSayCommand * | sayCommand () const |
get const pointer to the player's say command object | |
const PlayerPointtoCommand * | pointtoCommand () const |
get const pointer to the player's pointto command object | |
const PlayerAttentiontoCommand * | attentiontoCommand () const |
get const pointer to the player's attentionto command object | |
void | setKick (const double &power, const AngleDeg &rel_dir) |
create kick command and its effect with kick parameter | |
void | setDash (const double &power) |
create dash command and its effect with dash parameter | |
void | setTurn (const AngleDeg &moment) |
create turn command and its effect with turn parameter | |
void | setCatch () |
create catch command. | |
void | setMove (const double &x, const double &y) |
create move command and its effect with move parameter | |
void | setTackle (const double &power_or_dir) |
create tackle command and its effect with tackle parameter | |
void | setTurnNeck (const AngleDeg &moment) |
create turn_neck command and its effect with turn_neck parameter | |
void | setChangeView (const ViewWidth &width) |
create change_view command | |
void | addSayMessage (const SayMessage *message) |
create say command add new say message | |
bool | removeSayMessage (const char header) |
remove the registered say message if exist | |
void | setPointto (const double &x, const double &y) |
create pointto command and its effect with pointto parameter | |
void | setPointtoOff () |
create pointto command by off mode | |
void | setAttentionto (const SideID side, const int unum) |
create attentionto command | |
void | setAttentiontoOff () |
create attentionto command by off mode | |
const GameTime & | lastActionTime () const |
get last command composition time | |
PlayerCommand::Type | lastBodyCommandType () const |
get last perfomed command type to update SelfObject | |
bool | doneTurnNeck () const |
check if turn_neck is performed to update SelfObject | |
void | getKickInfo (Vector2D *accel, Vector2D *accel_err) const |
get estimated kick action effect | |
void | getTurnInfo (double *moment, double *err) const |
get estimated turn action effect | |
void | getDashInfo (Vector2D *accel, double *power) const |
get estimated dash action effect | |
const Vector2D & | getMovePos () const |
get move action effect | |
const GameTime & | getCatchTime () const |
get last time catch action is performed | |
void | getTackleInfo (double *power, double *dir) const |
get tackle action effect | |
const double & | getTurnNeckMoment () const |
get turn_neck action effect | |
const std::string & | getSayMessage () const |
get say action effect | |
int | getSayMessageLength () const |
get the total length of current reserved messages | |
const std::vector< const SayMessage * > & | sayMessageCont () const |
get the reserved say messages | |
const Vector2D & | getPointtoPos () const |
get pointto action effect | |
AngleDeg | queuedNextMyBody () const |
get estimated next body angle using queued action effect | |
Vector2D | queuedNextMyPos () const |
get estimated next position using queued action effect | |
bool | queuedNextBallKickable () const |
check if ball will be kickable in the next cycle | |
Vector2D | queuedNextBallPos () const |
get estimated next ball position using queued action effect | |
Vector2D | queuedNextBallVel () const |
get estimated next ball velocity using queued action effect | |
AngleDeg | queuedNextAngleFromBody (const Vector2D &target) const |
get estimated next angle of target point relative to estimated body angle using queued action effect | |
ViewWidth | queuedNextViewWidth () const |
get next view width using queued action effect |
rcsc::ActionEffector::ActionEffector | ( | const PlayerAgent & | agent | ) | [explicit] |
void rcsc::ActionEffector::incCommandCount | ( | const PlayerCommand::Type | type | ) |
increment command count
type | target command type |
void rcsc::ActionEffector::checkCommandCount | ( | const BodySensor & | sense | ) |
compare internal command count with sensed command count
sense | analyzed sense_body info |
std::ostream & rcsc::ActionEffector::makeCommand | ( | std::ostream & | to | ) |
make command string and update last action time
to | reference to the output stream |
const PlayerBodyCommand* rcsc::ActionEffector::bodyCommand | ( | ) | const [inline] |
get const pointer to the player's body command object
const PlayerTurnNeckCommand* rcsc::ActionEffector::turnNeckCommand | ( | ) | const [inline] |
get const pointer to the player's turn_neck command object
const PlayerChangeViewCommand* rcsc::ActionEffector::changeViewCommand | ( | ) | const [inline] |
get const pointer to the player's change_view command object
const PlayerSayCommand* rcsc::ActionEffector::sayCommand | ( | ) | const [inline] |
get const pointer to the player's say command object
const PlayerPointtoCommand* rcsc::ActionEffector::pointtoCommand | ( | ) | const [inline] |
get const pointer to the player's pointto command object
const PlayerAttentiontoCommand* rcsc::ActionEffector::attentiontoCommand | ( | ) | const [inline] |
get const pointer to the player's attentionto command object
void rcsc::ActionEffector::setKick | ( | const double & | power, | |
const AngleDeg & | rel_dir | |||
) |
create kick command and its effect with kick parameter
power | kick power for command argument | |
rel_dir | kick direction relative to body angle for command argument |
void rcsc::ActionEffector::setDash | ( | const double & | power | ) |
create dash command and its effect with dash parameter
power | dash power for command argument |
void rcsc::ActionEffector::setTurn | ( | const AngleDeg & | moment | ) |
create turn command and its effect with turn parameter
moment | turn moment that player wants to perform |
void rcsc::ActionEffector::setCatch | ( | ) |
create catch command.
command argumment, catch direction is calculated in this method. catch direction is calculated using diagonal line direction
void rcsc::ActionEffector::setMove | ( | const double & | x, | |
const double & | y | |||
) |
create move command and its effect with move parameter
x | move target point x | |
y | move target point y |
void rcsc::ActionEffector::setTackle | ( | const double & | power_or_dir | ) |
create tackle command and its effect with tackle parameter
power_or_dir | tackle power or directin for command argument |
void rcsc::ActionEffector::setTurnNeck | ( | const AngleDeg & | moment | ) |
create turn_neck command and its effect with turn_neck parameter
moment | turn_neck moment that player wants to perform |
void rcsc::ActionEffector::setChangeView | ( | const ViewWidth & | width | ) |
create change_view command
width | view width that player wants. |
void rcsc::ActionEffector::addSayMessage | ( | const SayMessage * | message | ) |
create say command add new say message
message | say message object. this must be a dynamically allocated object. |
bool rcsc::ActionEffector::removeSayMessage | ( | const char | header | ) |
remove the registered say message if exist
header | message header character |
void rcsc::ActionEffector::setPointto | ( | const double & | x, | |
const double & | y | |||
) |
create pointto command and its effect with pointto parameter
x | target point x | |
y | target point y |
void rcsc::ActionEffector::setAttentionto | ( | const SideID | side, | |
const int | unum | |||
) |
create attentionto command
side | target player's side | |
unum | target player's uniform number |
const GameTime& rcsc::ActionEffector::lastActionTime | ( | ) | const [inline] |
get last command composition time
PlayerCommand::Type rcsc::ActionEffector::lastBodyCommandType | ( | ) | const [inline] |
bool rcsc::ActionEffector::doneTurnNeck | ( | ) | const [inline] |
check if turn_neck is performed to update SelfObject
get estimated kick action effect
accel | variable pointer to store the estimated ball accel | |
accel_err | variable pointer to store the estimated ball accel error |
void rcsc::ActionEffector::getTurnInfo | ( | double * | moment, | |
double * | err | |||
) | const [inline] |
get estimated turn action effect
moment | variable pointer to store the estimated actual turned moment | |
err | variable pointer to store the estimated turned moment error |
void rcsc::ActionEffector::getDashInfo | ( | Vector2D * | accel, | |
double * | power | |||
) | const [inline] |
get estimated dash action effect
accel | variable pointer to store the estimated dash accel | |
power | variable pointer to store the used dash power |
const Vector2D& rcsc::ActionEffector::getMovePos | ( | ) | const [inline] |
get move action effect
const GameTime& rcsc::ActionEffector::getCatchTime | ( | ) | const [inline] |
get last time catch action is performed
void rcsc::ActionEffector::getTackleInfo | ( | double * | power, | |
double * | dir | |||
) | const [inline] |
get tackle action effect
power | variable pointer to store the used tackle power | |
dir | variable pointer to store the tackle direction |
const double& rcsc::ActionEffector::getTurnNeckMoment | ( | ) | const [inline] |
get turn_neck action effect
const std::string& rcsc::ActionEffector::getSayMessage | ( | ) | const [inline] |
get say action effect
int rcsc::ActionEffector::getSayMessageLength | ( | ) | const |
get the total length of current reserved messages
const std::vector< const SayMessage * >& rcsc::ActionEffector::sayMessageCont | ( | ) | const [inline] |
get the reserved say messages
const Vector2D& rcsc::ActionEffector::getPointtoPos | ( | ) | const [inline] |
get pointto action effect
AngleDeg rcsc::ActionEffector::queuedNextMyBody | ( | ) | const |
get estimated next body angle using queued action effect
Vector2D rcsc::ActionEffector::queuedNextMyPos | ( | ) | const |
get estimated next position using queued action effect
bool rcsc::ActionEffector::queuedNextBallKickable | ( | ) | const |
check if ball will be kickable in the next cycle
Vector2D rcsc::ActionEffector::queuedNextBallPos | ( | ) | const |
get estimated next ball position using queued action effect
Vector2D rcsc::ActionEffector::queuedNextBallVel | ( | ) | const |
get estimated next ball velocity using queued action effect
get estimated next angle of target point relative to estimated body angle using queued action effect
ViewWidth rcsc::ActionEffector::queuedNextViewWidth | ( | ) | const |
get next view width using queued action effect