32#ifndef RCSC_PLAYER_SELF_OBJECT_H
33#define RCSC_PLAYER_SELF_OBJECT_H
55 static int S_pos_count_thr;
57 static int S_vel_count_thr;
59 static int S_face_count_thr;
88 int M_charged_expires;
97 int M_attentionto_unum;
104 bool M_collision_estimated;
105 bool M_collides_with_none;
106 bool M_collides_with_ball;
107 bool M_collides_with_player;
108 bool M_collides_with_post;
113 double M_catch_probability;
114 double M_tackle_probability;
115 double M_foul_probability;
142 const int face_thr );
270 return M_view_quality;
305 return M_last_catch_time;
314 return M_tackle_expires;
317 int chargedExpires()
const
319 return M_charged_expires;
328 return M_tackle_expires > 0
329 || M_charged_expires > 0;
338 return M_tackle_expires > 0;
347 return M_arm_movable;
356 return M_arm_expires;
365 return M_pointto_pos;
374 return M_last_pointto_time;
383 return M_attentionto_side;
392 return M_attentionto_unum;
428 return M_stamina.
effort();
446 return M_collision_estimated;
455 return M_collides_with_none
456 || M_collides_with_ball
457 || M_collides_with_player
458 || M_collides_with_post;
467 return M_collides_with_none;
476 return M_collides_with_ball;
485 return M_collides_with_player;
494 return M_collides_with_post;
512 if ( i < 0 || 2 < i )
return M_last_moves[3];
513 return M_last_moves[i];
549 return M_catch_probability;
558 return M_tackle_probability;
567 return M_foul_probability;
587 void updateWindEffect();
621 const double & face_err,
639 const double & face_err,
671 const int self_reach_cycle,
672 const int teammate_reach_cycle,
673 const int opponent_reach_cycle );
702 M_pointto_pos = point;
703 M_last_pointto_time = done_time;
704 if (
pos().isValid() )
721 M_attentionto_side =
side;
722 M_attentionto_unum =
unum;
abstract player object class Header File
abstact player object class
Definition: abstract_player_object.h:52
const Vector2D & pos() const
get global position
Definition: abstract_player_object.h:265
bool goalie() const
get goalie flag
Definition: abstract_player_object.h:238
Vector2D M_vel
velocity
Definition: abstract_player_object.h:79
const PlayerType * M_player_type
player type reference
Definition: abstract_player_object.h:67
AngleDeg M_pointto_angle
global pointing angle
Definition: abstract_player_object.h:90
int M_pointto_count
time count since the last pointto observation
Definition: abstract_player_object.h:91
int unum() const
get player's uniform number
Definition: abstract_player_object.h:220
SideID side() const
get team side id
Definition: abstract_player_object.h:211
const AngleDeg & face() const
get global neck angle
Definition: abstract_player_object.h:373
manages action effect, command counter
Definition: action_effector.h:56
degree wrapper class
Definition: angle_deg.h:45
observed ball object class
Definition: ball_object.h:61
sense_body info holder
Definition: body_sensor.h:47
game time object
Definition: game_time.h:43
heterogeneous player parametor class
Definition: player_type.h:50
double dashPowerRate() const
get the player_type parameter
Definition: player_type.h:229
self object class
Definition: self_object.h:52
bool collidesWithNone() const
get a certain collistion status with no objects
Definition: self_object.h:465
const Vector2D & lastMove(const int i) const
get last 3 move vectors
Definition: self_object.h:510
double effort() const
get current effort value
Definition: self_object.h:426
bool collidesWithPost() const
get a certain collistion status with posts
Definition: self_object.h:492
double foulProbability() const
get estimated foul success probability
Definition: self_object.h:565
const Vector2D & posError() const
get estimated error of agent's global position
Definition: self_object.h:205
bool collisionEstimated() const
get estimated collistion status
Definition: self_object.h:444
const GameTime & pointtoTime() const
get pointto action performed time
Definition: self_object.h:372
SideID attentiontoSide() const
get current attentioned player's side
Definition: self_object.h:381
const Vector2D & pointtoPos() const
get estimated pointing point
Definition: self_object.h:363
double catchProbability() const
get estimated catch success probability
Definition: self_object.h:547
bool faceValid() const
verify angle accuracy
virtual bool isSelf() const
check if this player is self or not
Definition: self_object.h:161
double tackleProbability() const
get estimated tackle success probability
Definition: self_object.h:556
bool isTackling() const
check if player is tackling or not.
Definition: self_object.h:336
void updateBallInfo(const BallObject &ball)
update ball related status
double speed() const
get estimated speed
Definition: self_object.h:223
SelfObject()
constructor. just initialize member variables
void updateByCollision(const Vector2D &pos, const Vector2D &pos_error)
apply collision effect
void init(const SideID side, const int unum, const bool goalie)
set uniform number and goalie flag.
bool posValid() const
velify global position accuracy
bool hasSensedCollision() const
get a flag whether agent has a certain collistion info
Definition: self_object.h:453
bool collidesWithPlayer() const
get a certain collistion status with players
Definition: self_object.h:483
const double & faceError() const
get estimated error about angle
Definition: self_object.h:250
void updateVelDirAfterSee(const BodySensor &sense, const GameTime ¤t)
adjust velocity direction using observed facing angle and sensed speed
void updateAfterFullstate(const FullstateSensor::PlayerT &my_state, const ActionEffector &act, const GameTime ¤t)
update status using fullstate info
bool isKickable() const
get ball kickable status
Definition: self_object.h:520
int attentiontoUnum() const
get current attentioned player's uniform number
Definition: self_object.h:390
bool collidesWithBall() const
get a certain collistion status with ball
Definition: self_object.h:474
double kickRate() const
get current estimated kick power rate
Definition: self_object.h:529
const Vector2D & posPrev() const
get global position at previous cycle
Definition: self_object.h:214
bool velValid() const
verify velocity accuracy
const PlayerType & playerType() const
get player type parameter
Definition: self_object.h:177
const AngleDeg & neck() const
get estimated neck angle relative to body angle
Definition: self_object.h:241
int armMovable() const
get arm movable count. if this value equals 0, agent can perform pointto command.
Definition: self_object.h:345
const Vector2D & lastMove() const
get last move vector (transformation from previous to current)
Definition: self_object.h:501
void setPointto(const Vector2D &point, const GameTime &done_time)
set pointto effect
Definition: self_object.h:699
const Vector2D & velError() const
get estimated error of velocity
Definition: self_object.h:232
const ViewWidth & viewWidth() const
get current view width
Definition: self_object.h:259
int tackleExpires() const
get tackle expire count
Definition: self_object.h:312
void setAttentionto(const SideID side, const int unum)
set attentionto effect
Definition: self_object.h:718
double dashRate() const
get current dash power rate
Definition: self_object.h:538
static void set_count_thr(const int pos_thr, const int vel_thr, const int face_thr)
set accuracy count threshold values.
const ViewQuality & viewQuality() const
get current view quality
Definition: self_object.h:268
~SelfObject()=default
destructor. nothing to do
int armExpires() const
get am expires count. if this value equals 0, agent is not pointing anywhere.
Definition: self_object.h:354
Vector2D focusPoint() const
get the estimated focus point according to the self localization result
void updateAngleBySee(const double &face, const double &face_err, const GameTime ¤t)
update status using see info. but only angle.
double focusDist() const
get the focus distance updated by the sense_body message
Definition: self_object.h:277
virtual void setPlayerType(const int type)
update player type id
const GameTime & catchTime() const
get time when the last catch command is performed
Definition: self_object.h:303
double recovery() const
get current estimated recovery value
Definition: self_object.h:435
const AngleDeg & focusDir() const
get the focus direction updated by the sense_body message
Definition: self_object.h:288
void updateAfterSenseBody(const BodySensor &sense, const ActionEffector &act, const GameTime ¤t)
update status using sense_body info
double staminaCapacity() const
get current stamina capacity value
Definition: self_object.h:417
void updatePosBySee(const Vector2D &pos, const Vector2D &pos_err, const double &face, const double &face_err, const GameTime ¤t)
update status using see info
void setViewMode(const ViewWidth &w, const ViewQuality &q)
set view mode
Definition: self_object.h:685
void update(const ActionEffector &act, const GameTime ¤t)
update status only using internal info
double stamina() const
get current stamina value
Definition: self_object.h:408
void updateKickableState(const BallObject &ball, const int self_reach_cycle, const int teammate_reach_cycle, const int opponent_reach_cycle)
update ball kickable state
bool isFrozen() const
check if body is freezed by tackle effect
Definition: self_object.h:326
double getSafetyDashPower(const double &dash_power) const
get dash power to save recovery decay.
Definition: self_object.h:733
const StaminaModel & staminaModel() const
get current stamina model.
Definition: self_object.h:399
stamina management class
Definition: stamina_model.h:44
double capacity() const
get the current remained stamina capacity
Definition: stamina_model.h:103
double getSafetyDashPower(const PlayerType &player_type, const double dash_power, const double stamina_buffer=1.0) const
get dash power to save recovery
double recovery() const
get current recovery value
Definition: stamina_model.h:85
double effort() const
get current effort value
Definition: stamina_model.h:94
double stamina() const
get current stamina value
Definition: stamina_model.h:76
2D point vector class
Definition: vector_2d.h:46
double r() const
get the length of vector.
Definition: vector_2d.h:146
view quality data class
Definition: view_mode.h:216
view width data class
Definition: view_mode.h:43
fullstate info sensor Header File
game time depending on RCSSServer2D Header File
player's stamina model Header File
fullstate player info
Definition: fullstate_sensor.h:64
the type definition set for the RCSSServer2D
SideID
side type definition
Definition: types.h:47
2d vector class Header File.
player view mode data classes Header File