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

Cognition Class Reference

A Process for cognition related modules in the HU1 process layout. More...

#include <Cognition.h>

Inheritance diagram for Cognition:

Inheritance graph
[legend]
Collaboration diagram for Cognition:

Collaboration graph
[legend]
List of all members.

representations

void performFpsMeasure ()
char colorTableBuffer [sizeof(ColorTable64) > sizeof(ColorTableTSL)?sizeof(ColorTable64) > sizeof(ColorTable32K)?sizeof(ColorTable64):sizeof(ColorTable32K):sizeof(ColorTableTSL) > sizeof(ColorTable32K)?sizeof(ColorTableTSL):sizeof(ColorTable32K)]
 the color tables

ColorTablecolorTable
 the color table

CameraMatrix cameraMatrix
 The offset and rotation of the camera.

BallPercept ballPercept
 Detected balls.

PlayersPercept playersPercept
 Detected players.

ObstaclesPercept obstaclesPercept
 Detected obstacles.

CollisionPercept collisionPercept
 The collision percept.

LinesPercept linesPercept
 Detected lines.

EdgesPercept edgesPercept
 Detected edges.

BodyPercept bodyPercept
 Detected switches.

BodyPosture bodyPosture
 The height and the inclination of the robot's body.

PSDPercept psdPercept
 A spot relative to the robot that was detected by the PSD sensor.

SpecialPercept specialPercept
 A special percept.

SpecialVisionRequest specialVisionRequest
 The request for the specialVision module.

CalibrationRequest calibrationRequest
 The request for calibration.

SampleSetProxy< PoseSampleselfLocatorSamples
 The sample set proxy linked to the sample set of the active locator.

GT2005ParticleContainer ballLocatorSamples
 The particles of the ball locator.

PassCorridorCollection passCorridorCollection
 The calculated pass corridors.

PlayersModel playersModel
 The players model set by the players locator.

TeamMessageCollection teamMessageCollection
 The team message collection.

BehaviorTeamMessage outgoingBehaviorTeamMessage
 The outgoing behavior team message.

JoystickData joystickData
 Data produced by an extern sensor called joystick.

RobotPoseCollection robotPoseCollection
 robot pose collection

BallHandling ballHandling
 The feedback of the behavior about the ball handling.

unsigned long lastFrameNumber
unsigned long fpsCounter
unsigned long fpsLastMeasureTime

Public Member Functions

 Cognition ()
 constructor

 ~Cognition ()
 destructor

virtual int main ()
 is called from the framework once in every frame

virtual void init ()
 is called direct before the first call of main()

virtual bool handleMessage (InMessage &message)
 The function handles incoming debug messages.


Protected Attributes

bool processImage
 If true, then a new image was received in the current frame.

bool processSensorData
 If true, then new sensor data were received in the current frame.

bool processPercepts
 If true, then percepts were received or generated in the current frame.

GTCamWorldState gtCamWorldStateIN
 A GTCam Worldstate.

GTCamWorldState gtCamWorldStateOUT
bool traceStored
 Has a trace already been stored?

modules
ColorTableModSelectorpColorTableMod
 a reference to the colortable selector

ImageProcessorSelectorpImageProcessor
 a reference to the image processor

SensorDataProcessorSelectorpSensorDataProcessor
 a reference to the sensor data processor

CollisionDetectorSelectorpCollisionDetector
 a reference to the collision detector

RobotStateDetectorSelectorpRobotStateDetector
 a reference to the robot state detector

BallLocatorSelectorpBallLocator
 a reference to the ball-locator

TeamBallLocatorSelectorpTeamBallLocator
 a reference to the team ball locator

PlayersLocatorSelectorpPlayersLocator
 a reference to the players-locator

ObstaclesLocatorSelectorpObstaclesLocator
 a reference to the obstacles-locator

SelfLocatorSelectorpSelfLocator
 a reference to the self-locator

BehaviorControlSelectorpBehaviorControl
 a reference to the behavior control

SensorBehaviorControlSelectorpSensorBehaviorControl
 a reference to sensor based behavior control

SpecialVisionpSpecialVision
 a reference to the special vison module

GTCamSelectorpGTCamSelector
 a reference to the GTCamSelector


Private Member Functions

 RECEIVER (SensorDataBuffer)
 RECEIVER (Image)
 NET_RECEIVER (GameControlData)
 RECEIVER (PackageMotionCognition)
 RECEIVER (OdometryData)
 NET_SENDER (TeamMessage1)
 NET_SENDER (TeamMessage2)
 NET_SENDER (TeamMessage3)
 NET_RECEIVER (TeamMessage1)
 NET_RECEIVER (TeamMessage2)
 NET_RECEIVER (TeamMessage3)
 SENDER (PackageCognitionMotion)
 SHARED_SENDER (Trace)
 SHARED_RECEIVER (Trace)
 UDP_BROADCAST_HANDLER (GameControlData)

Private Attributes

 DEBUGGING
 GTCAM_HANDLER
 GTCAM_TIMESYNC_HANDLER
 STATUSBROADCAST_HANDLER
 UDP_HANDLER

Detailed Description

A Process for cognition related modules in the HU1 process layout.

Definition at line 62 of file Cognition.h.


Constructor & Destructor Documentation

Cognition::Cognition  ) 
 

constructor

Definition at line 28 of file Cognition.cpp.

References Process::debugOut, endl(), fpsCounter, fpsLastMeasureTime, SystemCall::getCurrentSystemTime(), getPlayer(), INIT_DEBUGGING, INIT_NET_RECEIVER, INIT_NET_SENDER, INIT_RECEIVER, INIT_RECEIVER_IMAGE, INIT_RECEIVER_SENSORDATA, INIT_SENDER, lastFrameNumber, pBallLocator, pBehaviorControl, pCollisionDetector, pColorTableMod, pGTCamSelector, pImageProcessor, pObstaclesLocator, pPlayersLocator, pRobotStateDetector, pSelfLocator, pSensorBehaviorControl, pSensorDataProcessor, pSpecialVision, pTeamBallLocator, GTCamWorldState::setFlip(), TeamMessageCollection::setInTeamMessages(), TeamMessageCollection::setOutTeamMessages(), MessageQueue::setSize(), setTrace(), and watchdog.

Here is the call graph for this function:

Cognition::~Cognition  ) 
 

destructor

Definition at line 315 of file Cognition.cpp.

References pBallLocator, pBehaviorControl, pCollisionDetector, pColorTableMod, pGTCamSelector, pImageProcessor, pObstaclesLocator, pPlayersLocator, pRobotStateDetector, pSelfLocator, pSensorBehaviorControl, pSensorDataProcessor, pSpecialVision, and pTeamBallLocator.


Member Function Documentation

Cognition::RECEIVER SensorDataBuffer   )  [private]
 

Cognition::RECEIVER Image   )  [private]
 

Cognition::NET_RECEIVER GameControlData   )  [private]
 

Cognition::RECEIVER PackageMotionCognition   )  [private]
 

Cognition::RECEIVER OdometryData   )  [private]
 

Cognition::NET_SENDER TeamMessage1   )  [private]
 

Cognition::NET_SENDER TeamMessage2   )  [private]
 

Cognition::NET_SENDER TeamMessage3   )  [private]
 

Cognition::NET_RECEIVER TeamMessage1   )  [private]
 

Cognition::NET_RECEIVER TeamMessage2   )  [private]
 

Cognition::NET_RECEIVER TeamMessage3   )  [private]
 

Cognition::SENDER PackageCognitionMotion   )  [private]
 

Cognition::SHARED_SENDER Trace   )  [private]
 

Cognition::SHARED_RECEIVER Trace   )  [private]
 

Cognition::UDP_BROADCAST_HANDLER GameControlData   )  [private]
 

int Cognition::main  )  [virtual]
 

is called from the framework once in every frame

"button based" sending of representations

test drawings

Implements Process.

Definition at line 354 of file Cognition.cpp.

References BallPercept::ballWasSeen, DEBUG_RESPONSE, Module::execute(), ModuleSelector::execute(), getPlayer(), getStreamHandler(), SystemCall::getTimeSince(), GT_TRACE, idBallModel, idBallPercept, idCameraMatrix, idCameraParameters, idCollisionPercept, idColorTable64, idDrawingManager, idEdgesPercept, idImage, idJPEGImage, idJPEGImage2, idLandmarksPercept, idLinesPercept, idLowResImage, idObstaclesPercept, idOdometryData, idPercepts, idPlayersPercept, idProcessBegin, idRobotPose, idSensorData, idSpecialPercept, idStreamSpecification, idText, idWorldState, INFO, MODIFY, NCOLORED_LINE, NCOMPLEX_DRAWING, NDECLARE_DEBUGDRAWING, NSTOP_TIME_ON_REQUEST, OUTPUT, pBallLocator, pBehaviorControl, pCollisionDetector, pColorTableMod, performFpsMeasure(), pGTCamSelector, pImageProcessor, pObstaclesLocator, pPlayersLocator, pRobotStateDetector, processImage, TeamMessageCollection::processMessages(), processPercepts, processSensorData, pSelfLocator, pSensorBehaviorControl, pSensorDataProcessor, pSpecialVision, pTeamBallLocator, SEND_IMAGE, SEND_PERCEPTS, SEND_WORLD_STATE, STOP_TIME_ON_REQUEST, traceStored, and WATCH.

Here is the call graph for this function:

void Cognition::init  )  [virtual]
 

is called direct before the first call of main()

Reimplemented from Process.

Definition at line 874 of file Cognition.cpp.

References getPlayer(), getRobotConfiguration(), idText, INIT_GTCAM_HANDLER, INIT_GTCAM_TIMESYNC_HANDLER, INIT_STATUSBROADCAST_HANDLER, INIT_UDP_HANDLER, OUTPUT, START_UDP_BROADCAST_HANDLER, and START_UDP_HANDLER.

Here is the call graph for this function:

bool Cognition::handleMessage InMessage message  )  [virtual]
 

The function handles incoming debug messages.

Parameters:
message the message to handle
Returns:
Has the message been handled?

Reimplemented from Process.

Definition at line 909 of file Cognition.cpp.

References InMessage::bin, ColorTableTSL::calculateLUT(), colorTableBuffer, GenericDebugData::data, Process::debugDataTable, Process::debugOut, CameraMatrix::frameNumber, InMessage::getMessageID(), getRobotConfiguration(), Process::handleMessage(), RobotConfiguration::handleMessage(), ModuleSelector::handleMessage(), GenericDebugData::id, idBehaviorEvolutionParameters, idBehaviorEvolutionPopulation, idBodyOffsets, idCameraParameters, idColorTable64, idColorTableTSL, idDDDSelfLocatorParameters, idDebugDataChangeRequest, idDebugRequest, idGameControlData, idGenericDebugData, idGT2004EvolutionRequest, idGT2004Parameters, idGTCamWorldState, idHeadControlMode, idImage, idImageProcessorParameters, idJoystickData, idJPEGImage, idKickSelectionTable, idLEDRequest, idLinesSelfLocatorParameters, idLowResImage, idMotionRequest, idOracledWorldState, idPercepts, idRemoteCamWorldState, idSensorData, idSoundRequest, idSpecialPercept, idText, idWorldState, idXabsl2DebugRequest, OUTPUT, pBehaviorControl, pImageProcessor, DebugDataTable::processChangeRequest(), processImage, processPercepts, processSensorData, pSelfLocator, RECEIVE_IMAGE, RECEIVE_PERCEPTS, RECEIVE_WORLDSTATE, Sensors::setCameraParameters(), TeamMessageCollection::setDelay(), and JPEGImage::toImage().

Here is the call graph for this function:

void Cognition::performFpsMeasure  )  [protected]
 

Definition at line 339 of file Cognition.cpp.

References fpsCounter, fpsLastMeasureTime, and SystemCall::getCurrentSystemTime().

Referenced by main().

Here is the call graph for this function:


Member Data Documentation

Cognition::DEBUGGING [private]
 

Definition at line 66 of file Cognition.h.

Cognition::GTCAM_HANDLER [private]
 

Definition at line 67 of file Cognition.h.

Cognition::GTCAM_TIMESYNC_HANDLER [private]
 

Definition at line 68 of file Cognition.h.

Cognition::STATUSBROADCAST_HANDLER [private]
 

Definition at line 72 of file Cognition.h.

Cognition::UDP_HANDLER [private]
 

Definition at line 97 of file Cognition.h.

bool Cognition::processImage [protected]
 

If true, then a new image was received in the current frame.

Definition at line 136 of file Cognition.h.

Referenced by handleMessage(), and main().

bool Cognition::processSensorData [protected]
 

If true, then new sensor data were received in the current frame.

Definition at line 139 of file Cognition.h.

Referenced by handleMessage(), and main().

bool Cognition::processPercepts [protected]
 

If true, then percepts were received or generated in the current frame.

Definition at line 142 of file Cognition.h.

Referenced by handleMessage(), and main().

GTCamWorldState Cognition::gtCamWorldStateIN [protected]
 

A GTCam Worldstate.

Definition at line 145 of file Cognition.h.

GTCamWorldState Cognition::gtCamWorldStateOUT [protected]
 

Definition at line 146 of file Cognition.h.

ColorTableModSelector* Cognition::pColorTableMod [protected]
 

a reference to the colortable selector

Definition at line 152 of file Cognition.h.

Referenced by Cognition(), main(), and ~Cognition().

ImageProcessorSelector* Cognition::pImageProcessor [protected]
 

a reference to the image processor

Definition at line 155 of file Cognition.h.

Referenced by Cognition(), handleMessage(), main(), and ~Cognition().

SensorDataProcessorSelector* Cognition::pSensorDataProcessor [protected]
 

a reference to the sensor data processor

Definition at line 158 of file Cognition.h.

Referenced by Cognition(), main(), and ~Cognition().

CollisionDetectorSelector* Cognition::pCollisionDetector [protected]
 

a reference to the collision detector

Definition at line 161 of file Cognition.h.

Referenced by Cognition(), main(), and ~Cognition().

RobotStateDetectorSelector* Cognition::pRobotStateDetector [protected]
 

a reference to the robot state detector

Definition at line 164 of file Cognition.h.

Referenced by Cognition(), main(), and ~Cognition().

BallLocatorSelector* Cognition::pBallLocator [protected]
 

a reference to the ball-locator

Definition at line 167 of file Cognition.h.

Referenced by Cognition(), main(), and ~Cognition().

TeamBallLocatorSelector* Cognition::pTeamBallLocator [protected]
 

a reference to the team ball locator

Definition at line 170 of file Cognition.h.

Referenced by Cognition(), main(), and ~Cognition().

PlayersLocatorSelector* Cognition::pPlayersLocator [protected]
 

a reference to the players-locator

Definition at line 173 of file Cognition.h.

Referenced by Cognition(), main(), and ~Cognition().

ObstaclesLocatorSelector* Cognition::pObstaclesLocator [protected]
 

a reference to the obstacles-locator

Definition at line 176 of file Cognition.h.

Referenced by Cognition(), main(), and ~Cognition().

SelfLocatorSelector* Cognition::pSelfLocator [protected]
 

a reference to the self-locator

Definition at line 179 of file Cognition.h.

Referenced by Cognition(), handleMessage(), main(), and ~Cognition().

BehaviorControlSelector* Cognition::pBehaviorControl [protected]
 

a reference to the behavior control

Definition at line 182 of file Cognition.h.

Referenced by Cognition(), handleMessage(), main(), and ~Cognition().

SensorBehaviorControlSelector* Cognition::pSensorBehaviorControl [protected]
 

a reference to sensor based behavior control

Definition at line 185 of file Cognition.h.

Referenced by Cognition(), main(), and ~Cognition().

SpecialVision* Cognition::pSpecialVision [protected]
 

a reference to the special vison module

Definition at line 188 of file Cognition.h.

Referenced by Cognition(), main(), and ~Cognition().

GTCamSelector* Cognition::pGTCamSelector [protected]
 

a reference to the GTCamSelector

Definition at line 191 of file Cognition.h.

Referenced by Cognition(), main(), and ~Cognition().

char Cognition::colorTableBuffer[sizeof(ColorTable64) > sizeof(ColorTableTSL) ? sizeof(ColorTable64) > sizeof(ColorTable32K) ? sizeof(ColorTable64) : sizeof(ColorTable32K) : sizeof(ColorTableTSL) > sizeof (ColorTable32K) ? sizeof(ColorTableTSL) : sizeof(ColorTable32K)] [protected]
 

the color tables

Definition at line 203 of file Cognition.h.

Referenced by handleMessage().

ColorTable& Cognition::colorTable [protected]
 

the color table

Definition at line 205 of file Cognition.h.

CameraMatrix Cognition::cameraMatrix [protected]
 

The offset and rotation of the camera.

Definition at line 208 of file Cognition.h.

BallPercept Cognition::ballPercept [protected]
 

Detected balls.

Definition at line 211 of file Cognition.h.

PlayersPercept Cognition::playersPercept [protected]
 

Detected players.

Definition at line 214 of file Cognition.h.

ObstaclesPercept Cognition::obstaclesPercept [protected]
 

Detected obstacles.

Definition at line 217 of file Cognition.h.

CollisionPercept Cognition::collisionPercept [protected]
 

The collision percept.

Definition at line 220 of file Cognition.h.

LinesPercept Cognition::linesPercept [protected]
 

Detected lines.

Definition at line 223 of file Cognition.h.

EdgesPercept Cognition::edgesPercept [protected]
 

Detected edges.

Definition at line 226 of file Cognition.h.

BodyPercept Cognition::bodyPercept [protected]
 

Detected switches.

Definition at line 229 of file Cognition.h.

BodyPosture Cognition::bodyPosture [protected]
 

The height and the inclination of the robot's body.

Definition at line 232 of file Cognition.h.

PSDPercept Cognition::psdPercept [protected]
 

A spot relative to the robot that was detected by the PSD sensor.

Definition at line 235 of file Cognition.h.

SpecialPercept Cognition::specialPercept [protected]
 

A special percept.

Definition at line 238 of file Cognition.h.

SpecialVisionRequest Cognition::specialVisionRequest [protected]
 

The request for the specialVision module.

Definition at line 241 of file Cognition.h.

CalibrationRequest Cognition::calibrationRequest [protected]
 

The request for calibration.

Definition at line 244 of file Cognition.h.

SampleSetProxy<PoseSample> Cognition::selfLocatorSamples [protected]
 

The sample set proxy linked to the sample set of the active locator.

Definition at line 247 of file Cognition.h.

GT2005ParticleContainer Cognition::ballLocatorSamples [protected]
 

The particles of the ball locator.

Definition at line 250 of file Cognition.h.

PassCorridorCollection Cognition::passCorridorCollection [protected]
 

The calculated pass corridors.

Definition at line 253 of file Cognition.h.

PlayersModel Cognition::playersModel [protected]
 

The players model set by the players locator.

Definition at line 256 of file Cognition.h.

TeamMessageCollection Cognition::teamMessageCollection [protected]
 

The team message collection.

Definition at line 259 of file Cognition.h.

BehaviorTeamMessage Cognition::outgoingBehaviorTeamMessage [protected]
 

The outgoing behavior team message.

Definition at line 262 of file Cognition.h.

JoystickData Cognition::joystickData [protected]
 

Data produced by an extern sensor called joystick.

Definition at line 265 of file Cognition.h.

RobotPoseCollection Cognition::robotPoseCollection [protected]
 

robot pose collection

Definition at line 268 of file Cognition.h.

BallHandling Cognition::ballHandling [protected]
 

The feedback of the behavior about the ball handling.

Definition at line 271 of file Cognition.h.

unsigned long Cognition::lastFrameNumber [protected]
 

Definition at line 273 of file Cognition.h.

Referenced by Cognition().

unsigned long Cognition::fpsCounter [protected]
 

Definition at line 276 of file Cognition.h.

Referenced by Cognition(), and performFpsMeasure().

unsigned long Cognition::fpsLastMeasureTime [protected]
 

Definition at line 277 of file Cognition.h.

Referenced by Cognition(), and performFpsMeasure().

bool Cognition::traceStored [protected]
 

Has a trace already been stored?

Definition at line 281 of file Cognition.h.

Referenced by main().


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