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

BallSymbols Class Reference

The Xabsl2 symbols that are defined in "ball-symbols.xml". More...

#include <BallSymbols.h>

Inheritance diagram for BallSymbols:

Inheritance graph
[legend]
Collaboration diagram for BallSymbols:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BallSymbols (const BehaviorControlInterfaces &interfaces)
void registerSymbols (Xabsl2Engine &engine)
 registers the symbols at an engine

void update ()
 updates the symbols

Input symbols
double getNumberOfImagesWithBallPercept ()
double getNumberOfImagesWithoutBallPercept ()
double getSeenDistance ()
double getSeenAngle ()
double getSeenSpeed ()
double getSeenRelativeSpeedX ()
double getSeenRelativeSpeedY ()
double getSeenDistanceX ()
double getSeenDistanceY ()
double getProjectedDistanceOnYAxis ()
double getTimeUntilBallCrossesYAxis ()
double getDistanceSeenBallToOwnPenaltyArea ()
double getTimeSinceLastSeen ()
double getConsecutivelySeenTime ()
double getTimeSinceLastSeenConsecutively ()
bool getBallSeenInFrontOfOpponentGoal ()
bool getJustSeen ()
double getKnownDistance ()
double getKnownAngle ()
double getKnownX ()
double getKnownY ()
double getTimeSinceLastKnown ()
double getTimeAfterWhichCommunicatedBallAreAccepted ()
double getMotionValidity ()
double getAngleToOpponentGoal ()

Private Attributes

RingBufferWithSum< 60 > ballDistanceRingBuffer
 A ring buffer needed to calculate the average ball distance.

double averageDistance
 The average distane to the ball.

bool ballIsHandledAtTheMoment
 Whether the ball is handled at the moment.

int ballWasHandledInLastFrame
 Whether the ball was handled in the last frame.

bool playBallPrecisely
int ballPrecision

Detailed Description

The Xabsl2 symbols that are defined in "ball-symbols.xml".

Author:
Martin Lötzsch

Definition at line 22 of file BallSymbols.h.


Constructor & Destructor Documentation

BallSymbols::BallSymbols const BehaviorControlInterfaces interfaces  ) 
 

Definition at line 13 of file BallSymbols.cpp.


Member Function Documentation

void BallSymbols::registerSymbols Xabsl2Engine engine  ) 
 

registers the symbols at an engine

Definition at line 23 of file BallSymbols.cpp.

References averageDistance, ballIsHandledAtTheMoment, ballPrecision, BallState::ballRollsByLeft, BallState::ballRollsByRight, BallState::ballRollsFast, BallState::ballRollsTowardsRobot, BallModel::ballState, ballWasHandledInLastFrame, BallModel::ballWasSeen, getAngleToOpponentGoal(), getBallSeenInFrontOfOpponentGoal(), getConsecutivelySeenTime(), getDistanceSeenBallToOwnPenaltyArea(), getJustSeen(), getKnownAngle(), getKnownDistance(), getKnownX(), getKnownY(), getMotionValidity(), getNumberOfImagesWithBallPercept(), getNumberOfImagesWithoutBallPercept(), getProjectedDistanceOnYAxis(), getSeenAngle(), getSeenDistance(), getSeenDistanceX(), getSeenDistanceY(), getSeenRelativeSpeedX(), getSeenRelativeSpeedY(), getSeenSpeed(), getTimeAfterWhichCommunicatedBallAreAccepted(), getTimeSinceLastKnown(), getTimeSinceLastSeen(), getTimeSinceLastSeenConsecutively(), getTimeUntilBallCrossesYAxis(), playBallPrecisely, Xabsl2Symbols::registerBooleanInputSymbol(), Xabsl2Symbols::registerDecimalInputSymbol(), Xabsl2Symbols::registerEnumeratedOutputSymbol(), Xabsl2Symbols::registerEnumeratedOutputSymbolEnumElement(), BallModel::seen, Vector2< double >::x, and Vector2< double >::y.

Referenced by GT2004BehaviorControl::registerSymbolsAndBasicBehaviors().

Here is the call graph for this function:

void BallSymbols::update  ) 
 

updates the symbols

Definition at line 105 of file BallSymbols.cpp.

References RingBufferWithSum< 60 >::add(), averageDistance, ballDistanceRingBuffer, ballIsHandledAtTheMoment, ballPrecision, ballWasHandledInLastFrame, RingBufferWithSum< 60 >::getNumberOfEntries(), RobotPose::getPose(), RingBufferWithSum< 60 >::getSum(), playBallPrecisely, and BallModel::seen.

Referenced by GT2004BehaviorControl::execute().

Here is the call graph for this function:

double BallSymbols::getNumberOfImagesWithBallPercept  ) 
 

A function for the symbol "ball.number-of-images-with-ball-percept"

Definition at line 260 of file BallSymbols.cpp.

References BallModel::numberOfImagesWithBallPercept.

Referenced by registerSymbols().

double BallSymbols::getNumberOfImagesWithoutBallPercept  ) 
 

A function for the symbol "ball.number-of-images-without-ball-percept"

Definition at line 265 of file BallSymbols.cpp.

References BallModel::numberOfImagesWithoutBallPercept.

Referenced by registerSymbols().

double BallSymbols::getSeenDistance  ) 
 

A function for the symbol "ball.seen.distance"

Definition at line 136 of file BallSymbols.cpp.

References Geometry::distanceTo(), RobotPose::getPose(), and BallModel::seen.

Referenced by getSeenDistanceX(), getSeenDistanceY(), and registerSymbols().

Here is the call graph for this function:

double BallSymbols::getSeenAngle  ) 
 

A function for the symbol "ball.seen.angle"

Definition at line 164 of file BallSymbols.cpp.

References RobotPose::getPose(), BallModel::seen, and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getSeenSpeed  ) 
 

A function for the symbol "ball.seen.speed"

Definition at line 170 of file BallSymbols.cpp.

References Vector2< double >::abs(), BallModel::seen, and SeenBallPosition::speed.

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getSeenRelativeSpeedX  ) 
 

A function for the symbol "ball.seen.relative-speed.x"

Definition at line 175 of file BallSymbols.cpp.

References Pose2D::rotation, BallModel::seen, SeenBallPosition::speed, Vector2< double >::x, and Vector2< double >::y.

Referenced by registerSymbols().

double BallSymbols::getSeenRelativeSpeedY  ) 
 

A function for the symbol "ball.seen.relative-speed.y"

Definition at line 182 of file BallSymbols.cpp.

References Pose2D::rotation, BallModel::seen, SeenBallPosition::speed, Vector2< double >::x, and Vector2< double >::y.

Referenced by registerSymbols().

double BallSymbols::getSeenDistanceX  ) 
 

A function for the symbol "ball.seen.distance-x"

Definition at line 141 of file BallSymbols.cpp.

References RobotPose::getPose(), getSeenDistance(), and BallModel::seen.

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getSeenDistanceY  ) 
 

A function for the symbol "ball.seen.distance-y"

Definition at line 147 of file BallSymbols.cpp.

References RobotPose::getPose(), getSeenDistance(), and BallModel::seen.

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getProjectedDistanceOnYAxis  ) 
 

A function for the symbol "ball.projectedDistanceOnYAxis"

Definition at line 199 of file BallSymbols.cpp.

References BallModel::ballState, and BallState::projectedDistanceOnYAxis.

Referenced by registerSymbols().

double BallSymbols::getTimeUntilBallCrossesYAxis  ) 
 

A function for the symbol "ball.timeBallCrossesYAxis"

Definition at line 194 of file BallSymbols.cpp.

References BallModel::ballState, and BallState::timeBallCrossesYAxis.

Referenced by registerSymbols().

double BallSymbols::getDistanceSeenBallToOwnPenaltyArea  ) 
 

A function for the symbol "ball.seen.distance-to-own-penalty-area"

Definition at line 189 of file BallSymbols.cpp.

References FieldDimensions::distanceToOwnPenaltyArea(), and BallModel::seen.

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getTimeSinceLastSeen  ) 
 

A function for the symbol "ball.time-since-last-seen"

Definition at line 230 of file BallSymbols.cpp.

References SystemCall::getTimeSince(), BallModel::seen, and SeenBallPosition::timeWhenLastSeen.

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getConsecutivelySeenTime  ) 
 

A function for the symbol "ball.consecutively-seen-time"

Definition at line 235 of file BallSymbols.cpp.

References BallModel::seen, SeenBallPosition::timeUntilSeenConsecutively, and SeenBallPosition::timeWhenFirstSeenConsecutively.

Referenced by registerSymbols().

double BallSymbols::getTimeSinceLastSeenConsecutively  ) 
 

A function for the symbol "ball.time-since-last-seen-consecutively"

Definition at line 241 of file BallSymbols.cpp.

References SystemCall::getTimeSince(), BallModel::seen, and SeenBallPosition::timeUntilSeenConsecutively.

Referenced by registerSymbols().

Here is the call graph for this function:

bool BallSymbols::getBallSeenInFrontOfOpponentGoal  ) 
 

A function for the symbol "ball.seen.ball-in-front-of-opponent-goal

Definition at line 246 of file BallSymbols.cpp.

References SeenBallPosition::ballInFrontOfOpponentGoal, and BallModel::seen.

Referenced by registerSymbols().

bool BallSymbols::getJustSeen  ) 
 

A function for the symbol "ball.just-seen"

Definition at line 250 of file BallSymbols.cpp.

References SystemCall::getTimeSince(), BallModel::seen, and SeenBallPosition::timeWhenLastSeen.

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getKnownDistance  ) 
 

A function for the symbol "ball.known.distance"

Definition at line 130 of file BallSymbols.cpp.

References Geometry::distanceTo(), BallModel::getKnownPosition(), and RobotPose::getPose().

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getKnownAngle  ) 
 

A function for the symbol "ball.known.angle"

Definition at line 153 of file BallSymbols.cpp.

References BallModel::getKnownPosition(), RobotPose::getPose(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getKnownX  ) 
 

A function for the symbol "ball.known.x"

Definition at line 204 of file BallSymbols.cpp.

References BallModel::getKnownPosition(), and Vector2< double >::x.

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getKnownY  ) 
 

A function for the symbol "ball.known.y"

Definition at line 210 of file BallSymbols.cpp.

References BallModel::getKnownPosition(), and Vector2< double >::y.

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getTimeSinceLastKnown  ) 
 

A function for the symbol "ball.time-since-last-known"

Definition at line 224 of file BallSymbols.cpp.

References BallModel::getTimeSinceLastKnown().

Referenced by registerSymbols().

Here is the call graph for this function:

double BallSymbols::getTimeAfterWhichCommunicatedBallAreAccepted  ) 
 

A function for the symbol "ball.time-after-which-communicated-balls-are-accepted"

Definition at line 159 of file BallSymbols.cpp.

Referenced by registerSymbols().

double BallSymbols::getMotionValidity  ) 
 

A function for the symbol "ball.seen.movementValidity"

Definition at line 216 of file BallSymbols.cpp.

References BallModel::motionValidity.

Referenced by registerSymbols().

double BallSymbols::getAngleToOpponentGoal  ) 
 

calculates the value for the symbol "ball.angle-to-opponent-goal"

Definition at line 255 of file BallSymbols.cpp.

References normalize(), BallModel::seen, and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:


Member Data Documentation

RingBufferWithSum<60> BallSymbols::ballDistanceRingBuffer [private]
 

A ring buffer needed to calculate the average ball distance.

Definition at line 69 of file BallSymbols.h.

Referenced by update().

double BallSymbols::averageDistance [private]
 

The average distane to the ball.

Definition at line 72 of file BallSymbols.h.

Referenced by registerSymbols(), and update().

bool BallSymbols::ballIsHandledAtTheMoment [private]
 

Whether the ball is handled at the moment.

Definition at line 75 of file BallSymbols.h.

Referenced by registerSymbols(), and update().

int BallSymbols::ballWasHandledInLastFrame [private]
 

Whether the ball was handled in the last frame.

Definition at line 78 of file BallSymbols.h.

Referenced by registerSymbols(), and update().

bool BallSymbols::playBallPrecisely [private]
 

Definition at line 81 of file BallSymbols.h.

Referenced by registerSymbols(), and update().

int BallSymbols::ballPrecision [private]
 

Definition at line 83 of file BallSymbols.h.

Referenced by registerSymbols(), and update().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:04:23 2004 for GT2004 by doxygen 1.3.6