Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

GTCamWorldState Class Reference

#include <GTCamWorldState.h>

List of all members.

Public Member Functions

 GTCamWorldState (bool flip=false)
 Contructor.

virtual ~GTCamWorldState ()
Vector2< double > getPlayerPos (int player, int color=Player::red) const
 Get player position from worldstate.

Vector2< double > getPlayerSpeed (int player, int color=Player::red) const
 Get player speed from worldstate.

double getPlayerOrientation (int player, int color=Player::red) const
 Get player orientation from worldstate.

double getTimestamp () const
 Get timestamp from worldstate.

BallModel getBallModel () const
 get ballModel from worldstate

void setPlayerPos (Vector2< double > pos, int player, int color=Player::red)
 Set player position in worldstate.

void setPlayerSpeed (Vector2< double > speed, int player, int color=Player::red)
 set player speed in worldstate

void setPlayerOrientation (double angle, int player, int color=Player::red)
 set player orientation in worldstate

void setTimestamp (double stamp)
 set timestamp in worldstate

void setFlip (bool x)
PlayerPoseCollection getPlayerPoseCollection (int player, int color=Player::red)
 Does not work for now.

RobotPose getRobotPose (int player, int color=Player::red) const
 Return robot pose of player.

RobotPose getRobotPose () const
double getSyncTimestamp () const
 Return the sync timestamp of the worldstate.

void setSyncTimestamp (double stamp)
 Set Sync Timestamp.

unsigned long getFrameNumber () const
void setBallPos (double X, double Y)
 Set the ball position.

void setBallSpeedX (double speedX)
 Set the X ball speed.

void setBallSpeedY (double speedY)
 Set the Y Ball speed.

void setBallSpeed (double speedX, double speedY)
 Set the Ball speed.

bool playerWasSeen (int player, int color=Player::red) const
 Was the player seen?


Static Public Attributes

const int SIZEOFWORLDSTATE = 46

Private Member Functions

bool is_NAN (double test) const
 Is test NaN?


Private Attributes

double camWorldstate [46]
unsigned long frameNumber
int flip

Friends

class RemoteCam
class RobotControlGTCamSocket
class GTCamHandler
class MSH2005KickLoggerSymbols


Constructor & Destructor Documentation

GTCamWorldState::GTCamWorldState bool  myFlip = false  ) 
 

Contructor.

Definition at line 25 of file GTCamWorldState.cpp.

References camWorldstate, setFlip(), setTimestamp(), and SIZEOFWORLDSTATE.

Here is the call graph for this function:

GTCamWorldState::~GTCamWorldState  )  [virtual]
 

Definition at line 42 of file GTCamWorldState.cpp.


Member Function Documentation

Vector2< double > GTCamWorldState::getPlayerPos int  player,
int  color = Player::red
const
 

Get player position from worldstate.

Definition at line 49 of file GTCamWorldState.cpp.

References camWorldstate, flip, playerWasSeen(), Vector2< V >::x, and Vector2< V >::y.

Referenced by GTCamPlayersLocator::execute(), GTCamObstaclesLocator::execute(), GTCamSymbols::getOwnPosX(), GTCamSymbols::getOwnPosY(), and getRobotPose().

Here is the call graph for this function:

Vector2< double > GTCamWorldState::getPlayerSpeed int  player,
int  color = Player::red
const
 

Get player speed from worldstate.

Definition at line 70 of file GTCamWorldState.cpp.

References camWorldstate, flip, playerWasSeen(), Vector2< V >::x, and Vector2< V >::y.

Referenced by GTCamPlayersLocator::execute(), GTCamSymbols::getOwnSpeedX(), and GTCamSymbols::getOwnSpeedY().

Here is the call graph for this function:

double GTCamWorldState::getPlayerOrientation int  player,
int  color = Player::red
const
 

Get player orientation from worldstate.

Definition at line 91 of file GTCamWorldState.cpp.

References camWorldstate, flip, pi, and playerWasSeen().

Referenced by GTCamPlayersLocator::execute(), GTCamObstaclesLocator::execute(), GTCamSymbols::getOwnRotation(), and getRobotPose().

Here is the call graph for this function:

double GTCamWorldState::getTimestamp  )  const
 

Get timestamp from worldstate.

Definition at line 117 of file GTCamWorldState.cpp.

References camWorldstate, and is_NAN().

Referenced by GT2005WalkCalibrationMainBehavior::execute(), and GTCamHandler::onReceive().

Here is the call graph for this function:

BallModel GTCamWorldState::getBallModel  )  const
 

get ballModel from worldstate

Definition at line 193 of file GTCamWorldState.cpp.

References BallModel::ballWasSeen, camWorldstate, flip, is_NAN(), BallModel::seen, and BallState::setBallDataRelativeToField().

Referenced by KickLogger::execute(), GTCamBallLocator::execute(), GTCamSymbols::getBallSpeedX(), GTCamSymbols::getBallSpeedY(), GTCamSymbols::getBallX(), and GTCamSymbols::getBallY().

Here is the call graph for this function:

void GTCamWorldState::setPlayerPos Vector2< double >  pos,
int  player,
int  color = Player::red
 

Set player position in worldstate.

Definition at line 131 of file GTCamWorldState.cpp.

References camWorldstate, Vector2< V >::x, and Vector2< V >::y.

void GTCamWorldState::setPlayerSpeed Vector2< double >  speed,
int  player,
int  color = Player::red
 

set player speed in worldstate

Definition at line 142 of file GTCamWorldState.cpp.

References camWorldstate, Vector2< V >::x, and Vector2< V >::y.

void GTCamWorldState::setPlayerOrientation double  angle,
int  player = 0,
int  color = Player::red
 

set player orientation in worldstate

Definition at line 153 of file GTCamWorldState.cpp.

References camWorldstate.

void GTCamWorldState::setTimestamp double  stamp  ) 
 

set timestamp in worldstate

Definition at line 163 of file GTCamWorldState.cpp.

References camWorldstate.

Referenced by GTCamWorldState(), and GTCamHandler::onReceive().

void GTCamWorldState::setFlip bool  x  ) 
 

Definition at line 33 of file GTCamWorldState.cpp.

References flip.

Referenced by Cognition::Cognition(), and GTCamWorldState().

PlayerPoseCollection GTCamWorldState::getPlayerPoseCollection int  player,
int  color = Player::red
 

Does not work for now.

Definition at line 253 of file GTCamWorldState.cpp.

RobotPose GTCamWorldState::getRobotPose int  player,
int  color = Player::red
const
 

Return robot pose of player.

Definition at line 228 of file GTCamWorldState.cpp.

References getPlayerOrientation(), getPlayerPos(), playerWasSeen(), Pose2D::rotation, RobotPose::setValidity(), Pose2D::translation, Vector2< double >::x, and Vector2< double >::y.

Referenced by GTCamSelfLocator::execute(), ComboLocator::execute(), SLBenchmark::execute(), GT2005WalkCalibrationMainBehavior::execute(), SLBenchmark::GoToNextTarget(), and SLBenchmark::RotateToNextTarget().

Here is the call graph for this function:

RobotPose GTCamWorldState::getRobotPose  )  const
 

Definition at line 247 of file GTCamWorldState.cpp.

References getPlayer().

Here is the call graph for this function:

double GTCamWorldState::getSyncTimestamp  )  const
 

Return the sync timestamp of the worldstate.

Definition at line 179 of file GTCamWorldState.cpp.

References camWorldstate, and is_NAN().

Here is the call graph for this function:

void GTCamWorldState::setSyncTimestamp double  stamp  ) 
 

Set Sync Timestamp.

Definition at line 171 of file GTCamWorldState.cpp.

References camWorldstate.

unsigned long GTCamWorldState::getFrameNumber  )  const
 

Definition at line 292 of file GTCamWorldState.cpp.

void GTCamWorldState::setBallPos double  X,
double  Y
 

Set the ball position.

Definition at line 263 of file GTCamWorldState.cpp.

References camWorldstate.

void GTCamWorldState::setBallSpeedX double  speedX  ) 
 

Set the X ball speed.

Definition at line 272 of file GTCamWorldState.cpp.

References camWorldstate.

Referenced by setBallSpeed().

void GTCamWorldState::setBallSpeedY double  speedY  ) 
 

Set the Y Ball speed.

Definition at line 279 of file GTCamWorldState.cpp.

References camWorldstate.

Referenced by setBallSpeed().

void GTCamWorldState::setBallSpeed double  speedX,
double  speedY
 

Set the Ball speed.

Definition at line 286 of file GTCamWorldState.cpp.

References setBallSpeedX(), and setBallSpeedY().

Here is the call graph for this function:

bool GTCamWorldState::playerWasSeen int  player,
int  color = Player::red
const
 

Was the player seen?

Definition at line 300 of file GTCamWorldState.cpp.

References camWorldstate, and is_NAN().

Referenced by GTCamSelfLocator::execute(), getPlayerOrientation(), getPlayerPos(), getPlayerSpeed(), and getRobotPose().

Here is the call graph for this function:

bool GTCamWorldState::is_NAN double  test  )  const [private]
 

Is test NaN?

Definition at line 327 of file GTCamWorldState.cpp.

Referenced by getBallModel(), getSyncTimestamp(), getTimestamp(), and playerWasSeen().


Friends And Related Function Documentation

friend class RemoteCam [friend]
 

Definition at line 20 of file GTCamWorldState.h.

friend class RobotControlGTCamSocket [friend]
 

Definition at line 21 of file GTCamWorldState.h.

friend class GTCamHandler [friend]
 

Definition at line 22 of file GTCamWorldState.h.

friend class MSH2005KickLoggerSymbols [friend]
 

Definition at line 23 of file GTCamWorldState.h.


Member Data Documentation

const int GTCamWorldState::SIZEOFWORLDSTATE = 46 [static]
 

Definition at line 345 of file GTCamWorldState.cpp.

Referenced by GTCamWorldState().

double GTCamWorldState::camWorldstate[46] [private]
 

Definition at line 103 of file GTCamWorldState.h.

Referenced by getBallModel(), getPlayerOrientation(), getPlayerPos(), getPlayerSpeed(), getSyncTimestamp(), getTimestamp(), GTCamWorldState(), GTCamHandler::onReceive(), playerWasSeen(), setBallPos(), setBallSpeedX(), setBallSpeedY(), setPlayerOrientation(), setPlayerPos(), setPlayerSpeed(), setSyncTimestamp(), and setTimestamp().

unsigned long GTCamWorldState::frameNumber [private]
 

Definition at line 105 of file GTCamWorldState.h.

Referenced by GTCamHandler::onReceive().

int GTCamWorldState::flip [private]
 

Definition at line 107 of file GTCamWorldState.h.

Referenced by getBallModel(), getPlayerOrientation(), getPlayerPos(), getPlayerSpeed(), and setFlip().


The documentation for this class was generated from the following files:
Generated on Mon Mar 20 22:16:00 2006 for GT2005 by doxygen 1.3.6