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

OpenChallengeSymbols Class Reference

#include <OpenChallengeSymbols.h>

Inheritance diagram for OpenChallengeSymbols:

Inheritance graph
[legend]
Collaboration diagram for OpenChallengeSymbols:

Collaboration graph
[legend]
List of all members.

Public Types

enum  OCStatus {
  initial = 0, intro, goToBridge,
  goToBitePoint, allBitePointsReady, walkWithBridge,
  extro, finished
}
enum  OCSetStatus {
  setInitial = 0, setIntro, setGoToBridge,
  setGoToBitePoint, setMyBitePointIsReady, setLostMyBitePoint,
  setWalkWithBridge, setExtro, setFinished
}
enum  CRIP { unchanged, rip }

Public Member Functions

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

void update ()
 updates the symbols

void setOCStatus (int aStatus)
Input symbols
OCBridge::Side getLastSeenSide ()
double getSeenDistanceToBridge ()
double getSeenAngleToBridge ()
double getTimeSinceLastSeenBridge ()
BitePoint::Position getBitePointPosition ()
double getSeenDistanceToBitePoint ()
double getSeenAngleToBitePoint ()
double getPreciseShiftToBitePoint ()
double getTimeSinceLastSeenBitePoint ()
double redLineInImageAngle ()
double redLineAngle ()
double getTimeSinceLastSeenRedLine ()
double getSeenDistanceToRedLine ()
double getSensorPSDNear ()
double getSensorPSDFar ()
double getDistanceToSIFOC ()
double getSensorAccelerationX ()
double getSensorAccelerationY ()
double getSensorAccelerationZ ()
double getAiboOnRamp ()
double getRampAngleOfRedLine ()
double getRampLowestLinePointX ()
double getRampLowestLinePointY ()
double getRampHighestLinePointX ()
double getRampHighestLinePointY ()
double getRampDistanceToStartPoint ()
double getRampTimeSinceLastSeen ()
void setRIP (int t)
void setOCStatusDtt (int aStatus)

Public Attributes

OCStatus ocStatus
 Varaible to hold the open challenge status.


Private Attributes

OC m_walkRequest
double m_headrot
int bitePointToUse [Player::numOfPlayerNumbers]
bool bitePointReady [BitePoint::numOfPositions]
int masterDog
SlidingAverageValue xspeed
int ambVal
int learnAcc
SlidingAverageValue groundVal

Member Enumeration Documentation

enum OpenChallengeSymbols::OCStatus
 

Enumeration values:
initial 
intro 
goToBridge 
goToBitePoint 
allBitePointsReady 
walkWithBridge 
extro 
finished 

Definition at line 44 of file OpenChallengeSymbols.h.

enum OpenChallengeSymbols::OCSetStatus
 

Enumeration values:
setInitial 
setIntro 
setGoToBridge 
setGoToBitePoint 
setMyBitePointIsReady 
setLostMyBitePoint 
setWalkWithBridge 
setExtro 
setFinished 

Definition at line 56 of file OpenChallengeSymbols.h.

enum OpenChallengeSymbols::CRIP
 

Enumeration values:
unchanged 
rip 

Definition at line 69 of file OpenChallengeSymbols.h.


Constructor & Destructor Documentation

OpenChallengeSymbols::OpenChallengeSymbols const BehaviorControlInterfaces interfaces  ) 
 

Definition at line 17 of file OpenChallengeSymbols.cpp.

References ambVal, bitePointReady, bitePointToUse, groundVal, learnAcc, m_walkRequest, masterDog, SlidingAverageValue::reset(), OC::rotation, OC::type, OC::x, and OC::y.

Here is the call graph for this function:


Member Function Documentation

void OpenChallengeSymbols::registerSymbols Xabsl2Engine engine  ) 
 

registers the symbols at an engine

Definition at line 49 of file OpenChallengeSymbols.cpp.

References allBitePointsReady, ambVal, dtt_finished, dtt_finishedBite, dtt_finishedClimbBridge, dtt_finishedExtro, dtt_finishedGoToBitePoint, dtt_finishedGoToBridge, dtt_finishedIntro, dtt_finishedWalkWithBridge, dtt_initial, dtt_loseBitePoints, dtt_start, getAiboOnRamp(), getBitePointPosition(), getDistanceToSIFOC(), getLastSeenSide(), getPreciseShiftToBitePoint(), getRampAngleOfRedLine(), getRampDistanceToStartPoint(), getRampHighestLinePointX(), getRampHighestLinePointY(), getRampLowestLinePointX(), getRampLowestLinePointY(), getRampTimeSinceLastSeen(), getSeenAngleToBitePoint(), getSeenAngleToBridge(), getSeenDistanceToBitePoint(), getSeenDistanceToBridge(), getSeenDistanceToRedLine(), getSensorAccelerationX(), getSensorAccelerationY(), getSensorAccelerationZ(), getSensorPSDFar(), getSensorPSDNear(), getTimeSinceLastSeenBitePoint(), getTimeSinceLastSeenBridge(), getTimeSinceLastSeenRedLine(), goToBitePoint, goToBridge, learnAcc, m_headrot, m_walkRequest, redLineAngle(), redLineInImageAngle(), Xabsl2Symbols::registerDecimalInputSymbol(), Xabsl2Symbols::registerEnumeratedInputSymbol(), Xabsl2Symbols::registerEnumeratedInputSymbolEnumElement(), Xabsl2Symbols::registerEnumeratedOutputSymbol(), Xabsl2Symbols::registerEnumeratedOutputSymbolEnumElement(), rip, OC::rotation, setExtro, setFinished, setGoToBitePoint, setGoToBridge, setInitial, setIntro, setLostMyBitePoint, setMyBitePointIsReady, setOCStatus(), setOCStatusDtt(), setRIP(), setWalkWithBridge, OC::type, unchanged, walkWithBridge, OC::x, and OC::y.

Referenced by GT2004BehaviorControl::registerSymbolsAndBasicBehaviors().

Here is the call graph for this function:

void OpenChallengeSymbols::update  ) 
 

updates the symbols

normally the following stuff should be placed inside an BridgeLocator module.. so this is near to a hack ;-)

Definition at line 208 of file OpenChallengeSymbols.cpp.

References Vector2< double >::abs(), SlidingAverageValue::add(), allBitePointsReady, Vector2< V >::angle(), BitePoint::angleTo, OCBridge::angleTo, OCBridge::bitePoint, bitePointReady, bitePointToUse, SensorData::data, BitePoint::distanceTo, OCBridge::distanceTo, BitePoint::fresh, OCBridge::fresh, fromDegrees(), fromMicroRad(), SlidingAverageValue::getAverage(), getPlayer(), Player::getPlayerNumber(), goToBitePoint, goToBridge, groundVal, SensorDataBuffer::lastFrame(), BitePoint::lastOdometry, OCBridge::lastOdometry, learnAcc, m_headrot, m_walkRequest, masterDog, Vector2< V >::normalize(), SpecialPercept::ocBridge, BitePoint::relPos, OCBridge::relPos, Vector2< V >::rotateLeft(), Vector2< V >::rotateRight(), Pose2D::rotation, OC::rotation, setExtro, setFinished, setGoToBitePoint, setGoToBridge, setInitial, setIntro, setLostMyBitePoint, setMyBitePointIsReady, setWalkWithBridge, sgn, toDegrees(), SlidingAverageValue::trigger(), OC::type, walkWithBridge, OC::x, Vector2< V >::x, xspeed, Vector2< double >::y, OC::y, and Vector2< V >::y.

Referenced by GT2004BehaviorControl::execute().

Here is the call graph for this function:

OCBridge::Side OpenChallengeSymbols::getLastSeenSide  ) 
 

A function for the symbol "bridge.last-seen-side"

Definition at line 370 of file OpenChallengeSymbols.cpp.

References OCBridge::lastSeenSide, and SpecialPercept::ocBridge.

Referenced by registerSymbols().

double OpenChallengeSymbols::getSeenDistanceToBridge  ) 
 

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

Definition at line 375 of file OpenChallengeSymbols.cpp.

References OCBridge::distanceTo, and SpecialPercept::ocBridge.

Referenced by registerSymbols().

double OpenChallengeSymbols::getSeenAngleToBridge  ) 
 

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

Definition at line 380 of file OpenChallengeSymbols.cpp.

References OCBridge::angleTo, SpecialPercept::ocBridge, and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getTimeSinceLastSeenBridge  ) 
 

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

Definition at line 385 of file OpenChallengeSymbols.cpp.

References SystemCall::getTimeSince(), SpecialPercept::ocBridge, and OCBridge::timeWhenLastSeen.

Referenced by registerSymbols().

Here is the call graph for this function:

BitePoint::Position OpenChallengeSymbols::getBitePointPosition  ) 
 

A function for the symbol "bite-point.position"

Definition at line 390 of file OpenChallengeSymbols.cpp.

References OCBridge::bitePoint, bitePointToUse, getPlayer(), Player::getPlayerNumber(), SpecialPercept::ocBridge, and BitePoint::position.

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getSeenDistanceToBitePoint  ) 
 

A function for the symbol "bite-point.seen.distance"

Definition at line 395 of file OpenChallengeSymbols.cpp.

References OCBridge::bitePoint, bitePointToUse, BitePoint::distanceTo, getPlayer(), Player::getPlayerNumber(), and SpecialPercept::ocBridge.

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getSeenAngleToBitePoint  ) 
 

A function for the symbol "bite-point.seen.angle"

Definition at line 400 of file OpenChallengeSymbols.cpp.

References OCBridge::bitePoint, bitePointToUse, getPlayer(), SpecialPercept::ocBridge, and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getPreciseShiftToBitePoint  ) 
 

A function for the symbol "bite-point.precise-shift"

Definition at line 405 of file OpenChallengeSymbols.cpp.

References OCBridge::bitePoint, bitePointToUse, getPlayer(), Player::getPlayerNumber(), SpecialPercept::ocBridge, and BitePoint::preciseShift.

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getTimeSinceLastSeenBitePoint  ) 
 

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

Definition at line 410 of file OpenChallengeSymbols.cpp.

References OCBridge::bitePoint, bitePointToUse, getPlayer(), SystemCall::getTimeSince(), and SpecialPercept::ocBridge.

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::redLineInImageAngle  ) 
 

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

Definition at line 534 of file OpenChallengeSymbols.cpp.

References OCRedLine::angleInImage, and SpecialPercept::ocRedLine.

Referenced by registerSymbols().

double OpenChallengeSymbols::redLineAngle  ) 
 

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

Definition at line 540 of file OpenChallengeSymbols.cpp.

References Vector2< int >::angle(), OCRedLine::lineStart, SpecialPercept::ocRedLine, and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getTimeSinceLastSeenRedLine  ) 
 

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

Definition at line 546 of file OpenChallengeSymbols.cpp.

References SystemCall::getCurrentSystemTime(), SpecialPercept::ocRedLine, and OCRedLine::timeWhenLastSeen.

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getSeenDistanceToRedLine  ) 
 

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

Definition at line 552 of file OpenChallengeSymbols.cpp.

References Vector2< int >::abs(), OCRedLine::lineStart, and SpecialPercept::ocRedLine.

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getSensorPSDNear  ) 
 

A function for the symbol "open-challenge.headpsd.near"

Definition at line 439 of file OpenChallengeSymbols.cpp.

References SensorData::data, SensorDataBuffer::frame, and SensorDataBuffer::numOfFrames.

Referenced by registerSymbols().

double OpenChallengeSymbols::getSensorPSDFar  ) 
 

A function for the symbol "open-challenge.headpsd.far"

Definition at line 452 of file OpenChallengeSymbols.cpp.

References SensorData::data, SensorDataBuffer::frame, and SensorDataBuffer::numOfFrames.

Referenced by registerSymbols().

double OpenChallengeSymbols::getDistanceToSIFOC  ) 
 

A function for the symbol "open-challenge.distance-to-sifoc"

Definition at line 465 of file OpenChallengeSymbols.cpp.

References PSDPercept::numOfPercepts.

Referenced by registerSymbols().

double OpenChallengeSymbols::getSensorAccelerationX  ) 
 

A function for the symbol "open-challenge.accelerator.x"

Definition at line 492 of file OpenChallengeSymbols.cpp.

References SensorData::data, SensorDataBuffer::frame, fromMicroRad(), SensorDataBuffer::numOfFrames, and toDegrees().

Referenced by getAiboOnRamp(), and registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getSensorAccelerationY  ) 
 

A function for the symbol "open-challenge.accelerator.y"

Definition at line 505 of file OpenChallengeSymbols.cpp.

References SensorData::data, SensorDataBuffer::frame, fromMicroRad(), SensorDataBuffer::numOfFrames, and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getSensorAccelerationZ  ) 
 

A function for the symbol "open-challenge.accelerator.z"

Definition at line 518 of file OpenChallengeSymbols.cpp.

References SensorData::data, SensorDataBuffer::frame, fromMicroRad(), SensorDataBuffer::lastFrame(), SensorDataBuffer::numOfFrames, and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getAiboOnRamp  ) 
 

A function for the symbol "open-challenge.on-ramp"

Definition at line 575 of file OpenChallengeSymbols.cpp.

References SlidingAverageValue::add(), SlidingAverageValue::getAverage(), getSensorAccelerationX(), SlidingAverageValue::trigger(), and xspeed.

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getRampAngleOfRedLine  ) 
 

A function for the symbol "ramp.angle-of-line"

Definition at line 586 of file OpenChallengeSymbols.cpp.

References OCRedLine::angleInImage, and SpecialPercept::ocRedLine.

Referenced by registerSymbols().

double OpenChallengeSymbols::getRampLowestLinePointX  ) 
 

A function for the symbol "ramp.lowest-line-point.x"

Definition at line 592 of file OpenChallengeSymbols.cpp.

References OCRedLine::lineStart, SpecialPercept::ocRedLine, and Vector2< int >::x.

Referenced by registerSymbols().

double OpenChallengeSymbols::getRampLowestLinePointY  ) 
 

A function for the symbol "ramp.lowest-line-point.y"

Definition at line 598 of file OpenChallengeSymbols.cpp.

References OCRedLine::lineStart, SpecialPercept::ocRedLine, and Vector2< int >::y.

Referenced by registerSymbols().

double OpenChallengeSymbols::getRampHighestLinePointX  ) 
 

A function for the symbol "ramp.highest-line-point.x"

Definition at line 604 of file OpenChallengeSymbols.cpp.

References OCRedLine::lineEnd, SpecialPercept::ocRedLine, and Vector2< int >::x.

Referenced by registerSymbols().

double OpenChallengeSymbols::getRampHighestLinePointY  ) 
 

A function for the symbol "ramp.highest-line-point.y"

Definition at line 610 of file OpenChallengeSymbols.cpp.

References OCRedLine::lineEnd, SpecialPercept::ocRedLine, and Vector2< int >::y.

Referenced by registerSymbols().

double OpenChallengeSymbols::getRampDistanceToStartPoint  ) 
 

A function for the symbol "ramp.lowest-line-point.distance"

Definition at line 616 of file OpenChallengeSymbols.cpp.

References Vector2< int >::abs(), OCRedLine::lineStart, and SpecialPercept::ocRedLine.

Referenced by registerSymbols().

Here is the call graph for this function:

double OpenChallengeSymbols::getRampTimeSinceLastSeen  ) 
 

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

Definition at line 622 of file OpenChallengeSymbols.cpp.

References SystemCall::getTimeSince(), SpecialPercept::ocRedLine, and OCRedLine::timeWhenLastSeen.

Referenced by registerSymbols().

Here is the call graph for this function:

void OpenChallengeSymbols::setRIP int  t  ) 
 

A function for the symbol "openchallenge-image"

Definition at line 560 of file OpenChallengeSymbols.cpp.

References g_changetorip(), and rip.

Referenced by registerSymbols().

Here is the call graph for this function:

void OpenChallengeSymbols::setOCStatusDtt int  aStatus  ) 
 

A function for the symbol "open-challenge.set-status-dtt"

Definition at line 630 of file OpenChallengeSymbols.cpp.

References OCSetStatus2, and ocstate.

Referenced by registerSymbols().

void OpenChallengeSymbols::setOCStatus int  aStatus  ) 
 

Definition at line 415 of file OpenChallengeSymbols.cpp.

References bitePointReady, bitePointToUse, getPlayer(), Player::getPlayerNumber(), goToBitePoint, goToBridge, masterDog, BehaviorTeamMessage::ocStatus, setExtro, setFinished, setGoToBitePoint, setGoToBridge, setInitial, setIntro, setLostMyBitePoint, setMyBitePointIsReady, setWalkWithBridge, and walkWithBridge.

Referenced by registerSymbols().

Here is the call graph for this function:


Member Data Documentation

OCStatus OpenChallengeSymbols::ocStatus
 

Varaible to hold the open challenge status.

Definition at line 137 of file OpenChallengeSymbols.h.

OC OpenChallengeSymbols::m_walkRequest [private]
 

Definition at line 144 of file OpenChallengeSymbols.h.

Referenced by OpenChallengeSymbols(), registerSymbols(), and update().

double OpenChallengeSymbols::m_headrot [private]
 

Definition at line 145 of file OpenChallengeSymbols.h.

Referenced by registerSymbols(), and update().

int OpenChallengeSymbols::bitePointToUse[Player::numOfPlayerNumbers] [private]
 

Definition at line 147 of file OpenChallengeSymbols.h.

Referenced by getBitePointPosition(), getPreciseShiftToBitePoint(), getSeenAngleToBitePoint(), getSeenDistanceToBitePoint(), getTimeSinceLastSeenBitePoint(), OpenChallengeSymbols(), setOCStatus(), and update().

bool OpenChallengeSymbols::bitePointReady[BitePoint::numOfPositions] [private]
 

Definition at line 148 of file OpenChallengeSymbols.h.

Referenced by OpenChallengeSymbols(), setOCStatus(), and update().

int OpenChallengeSymbols::masterDog [private]
 

Definition at line 149 of file OpenChallengeSymbols.h.

Referenced by OpenChallengeSymbols(), setOCStatus(), and update().

SlidingAverageValue OpenChallengeSymbols::xspeed [private]
 

Definition at line 152 of file OpenChallengeSymbols.h.

Referenced by getAiboOnRamp(), and update().

int OpenChallengeSymbols::ambVal [private]
 

Definition at line 155 of file OpenChallengeSymbols.h.

Referenced by OpenChallengeSymbols(), and registerSymbols().

int OpenChallengeSymbols::learnAcc [private]
 

Definition at line 157 of file OpenChallengeSymbols.h.

Referenced by OpenChallengeSymbols(), registerSymbols(), and update().

SlidingAverageValue OpenChallengeSymbols::groundVal [private]
 

Definition at line 158 of file OpenChallengeSymbols.h.

Referenced by OpenChallengeSymbols(), and update().


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