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

BallModel Class Reference

Contains the modeled knowledge about the ball. More...

#include <BallModel.h>

Inheritance diagram for BallModel:

Inheritance graph
[legend]
Collaboration diagram for BallModel:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  behaviorControlTimeAfterWhichCommunicatedBallsAreAccepted = 2000, timeAfterWhichPropagatedAreUsed = 100, maxDistanceToUseSeen = 500,
  minDistanceToUseSeen = 150
}
 The time for the behaviorControl after that communicated ball positions are accepted. More...


Public Member Functions

 BallModel ()
 Constructor.

void reset ()
 Resets the ball model.

void setFrameNumber (unsigned long frameNumber)
 Sets the frame number of the image this model was created from.

const Vector2< double > & getKnownPosition (unsigned long timeAfterWhichCommunicatedBallsAreAccepted) const
 Returns a "known" ball position relative to the field.

const Vector2< double > & getKnownPosition (unsigned long timeAfterWhichCommunicatedBallsAreAccepted, unsigned long timeAfterWhichPropagatedAreUsed, double maxDistanceToUseSeen, double minDistanceToUseSeen) const
const BallStategetKnownBallState (unsigned long timeAfterWhichCommunicatedBallsAreAccepted=behaviorControlTimeAfterWhichCommunicatedBallsAreAccepted, unsigned long timeAfterPropagatedAreUsed=timeAfterWhichPropagatedAreUsed, double maxDistanceUseSeen=maxDistanceToUseSeen, double minDistanceUseSeen=minDistanceToUseSeen) const
unsigned long getTimeSinceLastKnown (unsigned long timeAfterWhichCommunicatedBallsAreAccepted) const
 Returns the time since the ball was seen or communicated.

virtual void serialize (In *in, Out *out)

Public Attributes

unsigned long frameNumber
 The frame number of the image this model was created from.

int numberOfImagesWithoutBallPercept
 The number of consecutive images without ball percept.

int numberOfImagesWithBallPercept
 The number of consecutive images with ball percept.

bool ballWasSeen
 True if the ball was seen (a ball percept exists).

SeenBallState seen
 The state of the ball estimated from own observations.

PropagatedBallState propagated
 The state of the ball estimated from own observations; it is propagated even if the ball is not seen.

CommunicatedBallState communicated
 The state of the ball estimated from own observations and from observation of other players.

HypotheticalBallState hypothetical
 The state of the ball guessed from own negative information after ball was lost.


Detailed Description

Contains the modeled knowledge about the ball.

Definition at line 576 of file BallModel.h.


Member Enumeration Documentation

anonymous enum
 

The time for the behaviorControl after that communicated ball positions are accepted.

Enumeration values:
behaviorControlTimeAfterWhichCommunicatedBallsAreAccepted 
timeAfterWhichPropagatedAreUsed 
maxDistanceToUseSeen 
minDistanceToUseSeen 

Definition at line 583 of file BallModel.h.


Constructor & Destructor Documentation

BallModel::BallModel  ) 
 

Constructor.

Definition at line 588 of file BallModel.cpp.

References reset().

Here is the call graph for this function:


Member Function Documentation

void BallModel::reset  ) 
 

Resets the ball model.

Definition at line 593 of file BallModel.cpp.

References ballWasSeen, communicated, hypothetical, numberOfImagesWithBallPercept, numberOfImagesWithoutBallPercept, propagated, BallState::reset(), CommunicatedBallState::reset(), PropagatedBallState::reset(), SeenBallState::reset(), and seen.

Referenced by BallModel().

Here is the call graph for this function:

void BallModel::setFrameNumber unsigned long  frameNumber  ) 
 

Sets the frame number of the image this model was created from.

Parameters:
frameNumber The frame number.

Definition at line 606 of file BallModel.cpp.

Referenced by LogPlayer::saveSynchronized().

const Vector2< double > & BallModel::getKnownPosition unsigned long  timeAfterWhichCommunicatedBallsAreAccepted  )  const
 

Returns a "known" ball position relative to the field.

If the ball was seen, the seen ball position is used. If the ball was not seen for a timeAfterThatCommunicatedBallsAreAccepted, the communicatedBallPosition is returned, if there was received a ball position.

Parameters:
timeAfterWhichCommunicatedBallsAreAccepted The time after that the communicated position is returned

Definition at line 611 of file BallModel.cpp.

References communicated, SystemCall::getTimeSince(), BallState::positionField, seen, CommunicatedBallState::timeWhenLastObserved, and SeenBallState::timeWhenLastSeen.

Referenced by GT2005StrategySymbols::estimateTimeToReachBall(), GT2005BasicBehaviorGoalieReturnToGoal::execute(), GT2005BasicBehaviorGoaliePosition::execute(), GT2005BasicBehaviorGoToBallWithoutTurning::execute(), GT2005BasicBehaviorGoToBall::execute(), GT2005BasicBehaviorNewGoToBall::execute(), GT2005PotentialFieldBasicBehaviorOffensiveSupport::execute(), PassSymbols::getAngleToPassSender(), BallSymbols::getKnownAngle(), BallSymbols::getKnownOrNearAngle(), BallSymbols::getKnownOrNearX(), BallSymbols::getKnownOrNearY(), BallSymbols::getKnownX(), BallSymbols::getKnownY(), KickLoggerSymbols::getPropagatedRelativeX(), OpenChallengeSymbols::guideDogMoveForward(), OpenChallengeSymbols::guideDogTellsBlindDogTurn(), and GTStandardConverter::setData().

Here is the call graph for this function:

const Vector2< double > & BallModel::getKnownPosition unsigned long  timeAfterWhichCommunicatedBallsAreAccepted,
unsigned long  timeAfterWhichPropagatedAreUsed,
double  maxDistanceToUseSeen,
double  minDistanceToUseSeen
const
 

Definition at line 634 of file BallModel.cpp.

References Vector2< double >::abs(), communicated, BallState::getPositionValidity(), SystemCall::getTimeSince(), idText, INFO, BallState::positionField, BallState::positionRobot, propagated, seen, CommunicatedBallState::timeWhenLastObserved, and SeenBallState::timeWhenLastSeen.

Here is the call graph for this function:

const BallState & BallModel::getKnownBallState unsigned long  timeAfterWhichCommunicatedBallsAreAccepted = behaviorControlTimeAfterWhichCommunicatedBallsAreAccepted,
unsigned long  timeAfterPropagatedAreUsed = timeAfterWhichPropagatedAreUsed,
double  maxDistanceUseSeen = maxDistanceToUseSeen,
double  minDistanceUseSeen = minDistanceToUseSeen
const
 

Definition at line 684 of file BallModel.cpp.

References Vector2< double >::abs(), communicated, BallState::getPositionValidity(), SystemCall::getTimeSince(), BallState::positionRobot, propagated, seen, CommunicatedBallState::timeWhenLastObserved, and SeenBallState::timeWhenLastSeen.

Referenced by BallSymbols::calculateInterceptionPoint(), GT2005StrategySymbols::computeRole(), BallSymbols::getAngleToOpponentGoal(), BallSymbols::getBallSeenInFrontOfOpponentGoal(), BallSymbols::getKnownDistance(), BallSymbols::getKnownOrNearAngleToOwnGoal(), BallSymbols::getKnownOrNearDistance(), BallSymbols::getKnownOrNearDistanceToOwnPenaltyArea(), BallSymbols::getKnownOrNearProbability(), BallSymbols::getKnownOrNearRelativeSpeedX(), BallSymbols::getKnownOrNearRelativeSpeedY(), BallSymbols::getKnownOrNearRelativeX(), BallSymbols::getKnownOrNearRelativeY(), BallSymbols::getKnownOrNearSpeedAbs(), BallSymbols::getKnownOrNearSpeedX(), BallSymbols::getKnownOrNearSpeedY(), and OpenChallengeSymbols::guideDogMoveForward().

Here is the call graph for this function:

unsigned long BallModel::getTimeSinceLastKnown unsigned long  timeAfterWhichCommunicatedBallsAreAccepted  )  const
 

Returns the time since the ball was seen or communicated.

Parameters:
timeAfterWhichCommunicatedBallsAreAccepted as in getKnownPosition()

Definition at line 729 of file BallModel.cpp.

References communicated, SystemCall::getTimeSince(), min, seen, CommunicatedBallState::timeWhenLastObserved, and SeenBallState::timeWhenLastSeen.

Referenced by GT2005StrategySymbols::estimateTimeToReachBall(), BallSymbols::getTimeSinceLastKnown(), and GTStandardConverter::setData().

Here is the call graph for this function:

virtual void BallModel::serialize In in,
Out out
[inline, virtual]
 

Implements Streamable.

Definition at line 675 of file BallModel.h.

References ballWasSeen, communicated, hypothetical, numberOfImagesWithBallPercept, numberOfImagesWithoutBallPercept, propagated, seen, STREAM, STREAM_REGISTER_BEGIN, and STREAM_REGISTER_FINISH.


Member Data Documentation

unsigned long BallModel::frameNumber
 

The frame number of the image this model was created from.

Definition at line 641 of file BallModel.h.

Referenced by GTCamBallLocator::execute().

int BallModel::numberOfImagesWithoutBallPercept
 

The number of consecutive images without ball percept.

Definition at line 644 of file BallModel.h.

Referenced by BallSymbols::getNumberOfImagesWithoutBallPercept(), GTCamBallLocator::GTCamBallLocator(), reset(), serialize(), and GT2005BallLocator::setBallSymbols().

int BallModel::numberOfImagesWithBallPercept
 

The number of consecutive images with ball percept.

Definition at line 647 of file BallModel.h.

Referenced by GTCamBallLocator::execute(), BallSymbols::getNumberOfImagesWithBallPercept(), GTCamBallLocator::GTCamBallLocator(), reset(), serialize(), and GT2005BallLocator::setBallSymbols().

bool BallModel::ballWasSeen
 

True if the ball was seen (a ball percept exists).

Definition at line 650 of file BallModel.h.

Referenced by GTCamBallLocator::execute(), GTCamWorldState::getBallModel(), GTCamBallLocator::GTCamBallLocator(), OpenChallengeSymbols::guideDogMoveForward(), GT2005BehaviorControl::postExecute(), GT2005BehaviorControl::preExecute(), CLogAnalyzerBase::readRemoteCamWorldState(), BallSymbols::registerSymbols(), reset(), serialize(), GT2005BallLocator::setBallSymbols(), and KickLoggerSymbols::update().

SeenBallState BallModel::seen
 

The state of the ball estimated from own observations.

Definition at line 653 of file BallModel.h.

Referenced by GT2005ObstaclesLocator::addPSDPercept(), KickLoggerSymbols::ballHasStopped(), GT2005StrategySymbols::computeRole(), GT2005StrategySymbols::estimateTimeToReachBall(), KickLogger::execute(), GT2005BasicBehaviorGoalieReturnToGoal::execute(), GTCamBallLocator::execute(), KickLoggerSymbols::generateWalktoTarget(), GT2005HeadControlSymbols::getBallConsecutivelySeenTime(), GTCamWorldState::getBallModel(), GT2005HeadControlSymbols::getBallSpeedAbs(), GTCamSymbols::getBallSpeedX(), GTCamSymbols::getBallSpeedY(), GT2005HeadControlSymbols::getBallTimeSinceLastSeen(), KickLogger::getBallX(), GTCamSymbols::getBallX(), KickLogger::getBallY(), GTCamSymbols::getBallY(), BallSymbols::getConsecutivelySeenTime(), BallSymbols::getDistanceSeenBallToOwnPenaltyArea(), GT2005StrategySymbols::getGoalieMaxPositionSpeed(), BallSymbols::getJustSeen(), getKnownBallState(), getKnownPosition(), BallSymbols::getPositionValidity(), BallSymbols::getProjectedDistanceOnYAxis(), GT2005HeadControlSymbols::getRelativeBallSpeedX(), GT2005HeadControlSymbols::getRelativeBallSpeedY(), BallSymbols::getSeenAngle(), GT2005HeadControlSymbols::getSeenDistance(), BallSymbols::getSeenDistance(), BallSymbols::getSeenDistanceToBorder(), BallSymbols::getSeenDistanceX(), BallSymbols::getSeenDistanceY(), BallSymbols::getSeenPositionValidity(), BallSymbols::getSeenRelativeSpeedX(), BallSymbols::getSeenRelativeSpeedY(), BallSymbols::getSeenRelativeX(), BallSymbols::getSeenRelativeY(), BallSymbols::getSeenSpeed(), BallSymbols::getSeenSpeedX(), BallSymbols::getSeenSpeedY(), BallSymbols::getSeenVelocityValidity(), BallSymbols::getSpeedValidity(), getTimeSinceLastKnown(), BallSymbols::getTimeSinceLastSeen(), GT2005HeadControlSymbols::getTimeSinceLastSeenConsecutively(), BallSymbols::getTimeSinceLastSeenConsecutively(), BallSymbols::getTimeUntilBallCrossesYAxis(), GT2005BallLocator::GT2005BallLocator(), KickSelectionSymbols::intentionalKickPossible(), GT2005BehaviorControl::postExecute(), GT2005BehaviorControl::preExecute(), CLogAnalyzerBase::readRemoteCamWorldState(), BallSymbols::registerSymbols(), reset(), KickSelectionSymbols::retrieveKick(), LogPlayer::saveSynchronized(), serialize(), GT2005BallLocator::setBallSymbols(), GTStandardConverter::setData(), KickLoggerSymbols::update(), ObstaclesSymbols::update(), and BallSymbols::update().

PropagatedBallState BallModel::propagated
 

The state of the ball estimated from own observations; it is propagated even if the ball is not seen.

Definition at line 659 of file BallModel.h.

Referenced by KickLoggerSymbols::doExecute(), GT2005BasicBehaviorGoToBallPropagated::execute(), GTCamBallLocator::execute(), getKnownBallState(), getKnownPosition(), BallSymbols::getPropagatedAngle(), BallSymbols::getPropagatedDistance(), BallSymbols::getPropagatedPositionValidity(), BallSymbols::getPropagatedRelativeSpeedX(), BallSymbols::getPropagatedRelativeSpeedY(), BallSymbols::getPropagatedRelativeX(), BallSymbols::getPropagatedRelativeY(), BallSymbols::getPropagatedSpeedX(), BallSymbols::getPropagatedSpeedY(), BallSymbols::getPropagatedVelocityValidity(), BallSymbols::getPropagatedX(), BallSymbols::getPropagatedY(), GT2005BallLocator::GT2005BallLocator(), KickSelectionSymbols::intentionalKickPossible(), KickLoggerSymbols::isNear(), KickLoggerSymbols::kickLoggerSetExecuteState(), reset(), serialize(), and GT2005BallLocator::setBallSymbols().

CommunicatedBallState BallModel::communicated
 

The state of the ball estimated from own observations and from observation of other players.

Definition at line 665 of file BallModel.h.

Referenced by GTCamBallLocator::execute(), GT2005HeadControlSymbols::getCommunicatedBallDistance(), getKnownBallState(), getKnownPosition(), getTimeSinceLastKnown(), GT2005BehaviorControl::preExecute(), reset(), and serialize().

HypotheticalBallState BallModel::hypothetical
 

The state of the ball guessed from own negative information after ball was lost.

Definition at line 671 of file BallModel.h.

Referenced by BallSymbols::getHypotheticalAngle(), BallSymbols::getHypotheticalDistance(), BallSymbols::registerSymbols(), reset(), and serialize().


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