LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
rcsc::AbstractPlayerObject Class Referenceabstract

abstact player object class More...

#include <abstract_player_object.h>

Inheritance diagram for rcsc::AbstractPlayerObject:
Inheritance graph
[legend]
Collaboration diagram for rcsc::AbstractPlayerObject:
Collaboration graph
[legend]

Public Types

typedef std::vector< const AbstractPlayerObject * > Cont
 type of pointer container
 

Public Member Functions

 AbstractPlayerObject (const int id)
 initialize member variables.
 
 AbstractPlayerObject (const int id, const SideID side, const Localization::PlayerT &p)
 initialize member variables using observed info More...
 
virtual ~AbstractPlayerObject ()=default
 destructor. nothing to do
 
virtual bool isSelf () const
 check if this player is self or not More...
 
virtual bool isGhost () const
 check if this player is ghost object or not More...
 
virtual int ghostCount () const
 get the counter value as a ghost recognition More...
 
virtual bool isTackling () const =0
 check if player is tackling or not More...
 
virtual void setPlayerType (const int type)
 update player type id More...
 
void setCard (const Card card)
 update card state More...
 
void setBallReachStep (const int step)
 set the estimated minimum ball interception step. More...
 
int id () const
 get the ID number for this object More...
 
SideID side () const
 get team side id More...
 
int unum () const
 get player's uniform number More...
 
int unumCount () const
 get uniform number accuracy count More...
 
bool goalie () const
 get goalie flag More...
 
const PlayerTypeplayerTypePtr () const
 get the player type as a pointer. More...
 
Card card () const
 get card type More...
 
const Vector2Dpos () const
 get global position More...
 
int posCount () const
 get global position accuracy More...
 
const Vector2DseenPos () const
 get the last seen position More...
 
int seenPosCount () const
 get the number of cycles since last observation More...
 
const Vector2DheardPos () const
 get the last heard position More...
 
int heardPosCount () const
 get the number of cycles since last observation More...
 
const Vector2Dvel () const
 get velocity More...
 
int velCount () const
 get velocity accuracy More...
 
const Vector2DseenVel () const
 get the last seen velocity More...
 
int seenVelCount () const
 get the number of cycles since last observation More...
 
const AngleDegbody () const
 get global body angle More...
 
int bodyCount () const
 get global body angle accuracy More...
 
const AngleDegface () const
 get global neck angle More...
 
int faceCount () const
 get global neck angle accuracy More...
 
const AngleDegpointtoAngle () const
 get global pointing angle More...
 
int pointtoCount () const
 get global pointing angle accuracy More...
 
bool isKicking () const
 get kicking state information More...
 
double dist2 (const AbstractPlayerObject &p) const
 get the squared distance from this player to the target player More...
 
double dist (const AbstractPlayerObject &p) const
 get the distance from this player to the target player More...
 
double distFromBall () const
 get distance from ball More...
 
const AngleDegangleFromBall () const
 get angle from ball More...
 
double distFromSelf () const
 get distance from self More...
 
const AngleDegangleFromSelf () const
 get global angle from self position More...
 
int ballReachStep () const
 get the estimated minimum ball interception step. More...
 
virtual double kickRate () const
 get current estimated kick power rate More...
 
Vector2D inertiaPoint (const int n_step) const
 estimate reach point More...
 
Vector2D inertiaFinalPoint () const
 estimate final reach point More...
 

Static Public Member Functions

static double get_minimum_evaluation (const Cont &cont, const PlayerEvaluator *evaluator)
 get minimum evaluation value within the input container using evaluator More...
 
static double get_maximum_evaluation (const Cont &cont, const PlayerEvaluator *evaluator)
 get maximum evaluation value within the input container using evaluator More...
 

Protected Attributes

int M_id
 identical number as object ID
 
SideID M_side
 team side
 
int M_unum
 uniform number
 
int M_unum_count
 accuracy count
 
bool M_goalie
 goalie flag
 
const PlayerTypeM_player_type
 player type reference
 
Card M_card
 card information
 
Vector2D M_pos
 global coordinate
 
int M_pos_count
 main accuracy counter
 
Vector2D M_seen_pos
 last seen global coordinate
 
int M_seen_pos_count
 count since last observation
 
Vector2D M_heard_pos
 last heard global coordinate
 
int M_heard_pos_count
 count since last observation
 
Vector2D M_vel
 velocity
 
int M_vel_count
 accuracy count
 
Vector2D M_seen_vel
 last seen velocity
 
int M_seen_vel_count
 count since last observation
 
AngleDeg M_body
 global body angle
 
int M_body_count
 body angle accuracy
 
AngleDeg M_face
 global neck angle
 
int M_face_count
 face angle accuracy
 
AngleDeg M_pointto_angle
 global pointing angle
 
int M_pointto_count
 time count since the last pointto observation
 
bool M_kicking
 kicking state
 
double M_dist_from_ball
 distance from ball
 
AngleDeg M_angle_from_ball
 angle from ball
 
double M_dist_from_self
 distance from self
 
AngleDeg M_angle_from_self
 angle from self
 

Detailed Description

abstact player object class

Constructor & Destructor Documentation

◆ AbstractPlayerObject()

rcsc::AbstractPlayerObject::AbstractPlayerObject ( const int  id,
const SideID  side,
const Localization::PlayerT p 
)

initialize member variables using observed info

Parameters
idID number for this object
sideanalyzed side info
panalyzed seen player info

Member Function Documentation

◆ angleFromBall()

const AngleDeg & rcsc::AbstractPlayerObject::angleFromBall ( ) const
inline

get angle from ball

Returns
absolute angle value from ball

◆ angleFromSelf()

const AngleDeg & rcsc::AbstractPlayerObject::angleFromSelf ( ) const
inline

get global angle from self position

Returns
angle value from self position

◆ ballReachStep()

int rcsc::AbstractPlayerObject::ballReachStep ( ) const
inline

get the estimated minimum ball interception step.

Returns
estimated step value.

◆ body()

const AngleDeg & rcsc::AbstractPlayerObject::body ( ) const
inline

get global body angle

Returns
const reference to the angle object

◆ bodyCount()

int rcsc::AbstractPlayerObject::bodyCount ( ) const
inline

get global body angle accuracy

Returns
count from last observation

◆ card()

Card rcsc::AbstractPlayerObject::card ( ) const
inline

get card type

Returns
card type{NO_CARD,YELLOW,RED}

◆ dist()

double rcsc::AbstractPlayerObject::dist ( const AbstractPlayerObject p) const
inline

get the distance from this player to the target player

Parameters
ptarget player
Returns
distance value

◆ dist2()

double rcsc::AbstractPlayerObject::dist2 ( const AbstractPlayerObject p) const
inline

get the squared distance from this player to the target player

Parameters
ptarget player
Returns
squared distance value

◆ distFromBall()

double rcsc::AbstractPlayerObject::distFromBall ( ) const
inline

get distance from ball

Returns
distance value from ball

◆ distFromSelf()

double rcsc::AbstractPlayerObject::distFromSelf ( ) const
inline

get distance from self

Returns
distance value from self

◆ face()

const AngleDeg & rcsc::AbstractPlayerObject::face ( ) const
inline

get global neck angle

Returns
const reference to the angle object

◆ faceCount()

int rcsc::AbstractPlayerObject::faceCount ( ) const
inline

get global neck angle accuracy

Returns
count from last observation

◆ get_maximum_evaluation()

static double rcsc::AbstractPlayerObject::get_maximum_evaluation ( const Cont cont,
const PlayerEvaluator evaluator 
)
static

get maximum evaluation value within the input container using evaluator

Parameters
contcontainer of AbstractPlayerObject
evaluatorevaluator object (has to be dynamically allocated)

◆ get_minimum_evaluation()

static double rcsc::AbstractPlayerObject::get_minimum_evaluation ( const Cont cont,
const PlayerEvaluator evaluator 
)
static

get minimum evaluation value within the input container using evaluator

Parameters
contcontainer of AbstractPlayerObject
evaluatorevaluator object (has to be dynamically allocated)

◆ ghostCount()

virtual int rcsc::AbstractPlayerObject::ghostCount ( ) const
inlinevirtual

get the counter value as a ghost recognition

Returns
count as a ghost recognition

Reimplemented in rcsc::PlayerObject.

◆ goalie()

bool rcsc::AbstractPlayerObject::goalie ( ) const
inline

get goalie flag

Returns
true if this player is goalie

◆ heardPos()

const Vector2D & rcsc::AbstractPlayerObject::heardPos ( ) const
inline

get the last heard position

Returns
const reference to the point object

◆ heardPosCount()

int rcsc::AbstractPlayerObject::heardPosCount ( ) const
inline

get the number of cycles since last observation

Returns
count since last observation

◆ id()

int rcsc::AbstractPlayerObject::id ( ) const
inline

get the ID number for this object

Returns
ID number

◆ inertiaFinalPoint()

Vector2D rcsc::AbstractPlayerObject::inertiaFinalPoint ( ) const
inline

estimate final reach point

Returns
estimated point vector

◆ inertiaPoint()

Vector2D rcsc::AbstractPlayerObject::inertiaPoint ( const int  n_step) const
inline

estimate reach point

Parameters
n_stepthis method estimates ball point after this steps
Returns
estimated point vector

◆ isGhost()

virtual bool rcsc::AbstractPlayerObject::isGhost ( ) const
inlinevirtual

check if this player is ghost object or not

Returns
true if this player may be ghost object

Reimplemented in rcsc::PlayerObject.

◆ isKicking()

bool rcsc::AbstractPlayerObject::isKicking ( ) const
inline

get kicking state information

Returns
true if player performed the kick.

◆ isSelf()

virtual bool rcsc::AbstractPlayerObject::isSelf ( ) const
inlinevirtual

check if this player is self or not

Returns
true if this player is self

Reimplemented in rcsc::SelfObject.

◆ isTackling()

virtual bool rcsc::AbstractPlayerObject::isTackling ( ) const
pure virtual

check if player is tackling or not

Returns
checked result

Implemented in rcsc::PlayerObject, and rcsc::SelfObject.

◆ kickRate()

virtual double rcsc::AbstractPlayerObject::kickRate ( ) const
virtual

get current estimated kick power rate

Returns
calculated kick rate value

Reimplemented in rcsc::SelfObject.

◆ playerTypePtr()

const PlayerType * rcsc::AbstractPlayerObject::playerTypePtr ( ) const
inline

get the player type as a pointer.

Returns
player type pointer variable

◆ pointtoAngle()

const AngleDeg & rcsc::AbstractPlayerObject::pointtoAngle ( ) const
inline

get global pointing angle

Returns
const reference to the angle object

◆ pointtoCount()

int rcsc::AbstractPlayerObject::pointtoCount ( ) const
inline

get global pointing angle accuracy

Returns
count from last observation

◆ pos()

const Vector2D & rcsc::AbstractPlayerObject::pos ( ) const
inline

get global position

Returns
const reference to the point object

◆ posCount()

int rcsc::AbstractPlayerObject::posCount ( ) const
inline

get global position accuracy

Returns
count since last observation

◆ seenPos()

const Vector2D & rcsc::AbstractPlayerObject::seenPos ( ) const
inline

get the last seen position

Returns
const reference to the point object

◆ seenPosCount()

int rcsc::AbstractPlayerObject::seenPosCount ( ) const
inline

get the number of cycles since last observation

Returns
count since last seen

◆ seenVel()

const Vector2D & rcsc::AbstractPlayerObject::seenVel ( ) const
inline

get the last seen velocity

Returns
const reference to the vector object

◆ seenVelCount()

int rcsc::AbstractPlayerObject::seenVelCount ( ) const
inline

get the number of cycles since last observation

Returns
count since last seen

◆ setBallReachStep()

void rcsc::AbstractPlayerObject::setBallReachStep ( const int  step)
inline

set the estimated minimum ball interception step.

Parameters
stepestimated step value

◆ setCard()

void rcsc::AbstractPlayerObject::setCard ( const Card  card)
inline

update card state

Parameters
cardnew card type

◆ setPlayerType()

virtual void rcsc::AbstractPlayerObject::setPlayerType ( const int  type)
virtual

update player type id

Parameters
typenew player type id

Reimplemented in rcsc::SelfObject.

◆ side()

SideID rcsc::AbstractPlayerObject::side ( ) const
inline

get team side id

Returns
side id (LEFT,RIGHT,NEUTRAL)

◆ unum()

int rcsc::AbstractPlayerObject::unum ( ) const
inline

get player's uniform number

Returns
uniform number. if unknown player, returned -1

◆ unumCount()

int rcsc::AbstractPlayerObject::unumCount ( ) const
inline

get uniform number accuracy count

Returns
count since last observation

◆ vel()

const Vector2D & rcsc::AbstractPlayerObject::vel ( ) const
inline

get velocity

Returns
const reference to the vector object

◆ velCount()

int rcsc::AbstractPlayerObject::velCount ( ) const
inline

get velocity accuracy

Returns
count from last observation

The documentation for this class was generated from the following file: