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.

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.

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

representations
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.

LandmarksPercept landmarksPercept
 Detected landmarks.

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.

TeamMessageCollection teamMessageCollection
 The team message collection.

BehaviorTeamMessage outgoingBehaviorTeamMessage
 The outgoing behavior team message.

JoystickData joystickData
 Data produced by an extern sensor called joystick.

unsigned long frameNumber
 the color tables

unsigned long lastFrameNumber
 the color tables


Private Member Functions

 RECEIVER (SensorDataBuffer)
 RECEIVER (Image)
 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)

Private Attributes

 DEBUGGING
 UDP_HANDLER

Detailed Description

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

Definition at line 56 of file Cognition.h.


Constructor & Destructor Documentation

Cognition::Cognition  ) 
 

constructor

Definition at line 21 of file Cognition.cpp.

References Process::debugOut, INIT_DEBUGGING, INIT_NET_RECEIVER, INIT_NET_SENDER, INIT_RECEIVER, INIT_RECEIVER_IMAGE, INIT_RECEIVER_SENSORDATA, INIT_SENDER, pBallLocator, pBehaviorControl, pCollisionDetector, pColorTableMod, pImageProcessor, pObstaclesLocator, pPlayersLocator, pRobotStateDetector, pSelfLocator, pSensorBehaviorControl, pSensorDataProcessor, pSpecialVision, pTeamBallLocator, TeamMessageCollection::setInTeamMessages(), TeamMessageCollection::setOutTeamMessages(), and MessageQueue::setSize().

Here is the call graph for this function:

Cognition::~Cognition  ) 
 

destructor

Definition at line 193 of file Cognition.cpp.

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


Member Function Documentation

Cognition::RECEIVER SensorDataBuffer   )  [private]
 

Cognition::RECEIVER Image   )  [private]
 

Cognition::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]
 

int Cognition::main  )  [virtual]
 

is called from the framework once in every frame

The frameNumber

Implements Process.

Definition at line 211 of file Cognition.cpp.

References Module::execute(), ModuleSelector::execute(), SystemCall::getCurrentSystemTime(), getPlayer(), Player::getTeamColor(), SystemCall::getTimeSince(), idImage, idJPEGImage, idLowResImage, idOdometryData, idPercepts, idSensorData, idSpecialPercept, idText, idWorldState, INFO, OUTPUT, pBallLocator, pBehaviorControl, pCollisionDetector, pImageProcessor, pObstaclesLocator, pPlayersLocator, pRobotStateDetector, processImage, TeamMessageCollection::processMessages(), TeamMessageCollection::processOutMessages(), processPercepts, processSensorData, pSelfLocator, pSensorBehaviorControl, pSensorDataProcessor, pSpecialVision, pTeamBallLocator, TeamMessageCollection::send(), SEND_IMAGE, SEND_PERCEPTS, SEND_WORLD_STATE, STOP_TIME_ON_REQUEST, 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 346 of file Cognition.cpp.

References getPlayer(), getRobotConfiguration(), idText, INIT_UDP_HANDLER, OUTPUT, 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 363 of file Cognition.cpp.

References InMessage::bin, ColorTableTSL::calculateLUT(), colorTableBuffer, GenericDebugData::data, Process::debugOut, CameraMatrix::frameNumber, InMessage::getMessageID(), getPlayer(), getRobotConfiguration(), Process::handleMessage(), RobotConfiguration::handleMessage(), ModuleSelector::handleMessage(), GenericDebugData::id, idBodyOffsets, idCameraParameters, idColorTable64, idColorTableTSL, idFreezeRequest, idGameControlData, idGenericDebugData, idGlobalGameControlData, idGT2004EvolutionRequest, idGT2004Parameters, idHeadControlMode, idImage, idJoystickData, idJPEGImage, idKickSelectionTable, idLEDRequest, idLinesSelfLocatorParameters, idLowResImage, idMotionRequest, idOracledWorldState, idPercepts, idSensorData, idSoundRequest, idSpecialPercept, idTacticEntryArray, idText, idWorldState, idXabsl2DebugRequest, OUTPUT, pBehaviorControl, pImageProcessor, 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:


Member Data Documentation

Cognition::DEBUGGING [private]
 

Definition at line 59 of file Cognition.h.

Cognition::UDP_HANDLER [private]
 

Definition at line 76 of file Cognition.h.

bool Cognition::processImage [protected]
 

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

Definition at line 100 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 103 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 106 of file Cognition.h.

Referenced by handleMessage(), and main().

ColorTableModSelector* Cognition::pColorTableMod [protected]
 

a reference to the colortable selector

Definition at line 112 of file Cognition.h.

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

ImageProcessorSelector* Cognition::pImageProcessor [protected]
 

a reference to the image processor

Definition at line 115 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 118 of file Cognition.h.

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

CollisionDetectorSelector* Cognition::pCollisionDetector [protected]
 

a reference to the collision detector

Definition at line 121 of file Cognition.h.

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

RobotStateDetectorSelector* Cognition::pRobotStateDetector [protected]
 

a reference to the robot state detector

Definition at line 124 of file Cognition.h.

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

BallLocatorSelector* Cognition::pBallLocator [protected]
 

a reference to the ball-locator

Definition at line 127 of file Cognition.h.

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

TeamBallLocatorSelector* Cognition::pTeamBallLocator [protected]
 

a reference to the team ball locator

Definition at line 130 of file Cognition.h.

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

PlayersLocatorSelector* Cognition::pPlayersLocator [protected]
 

a reference to the players-locator

Definition at line 133 of file Cognition.h.

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

ObstaclesLocatorSelector* Cognition::pObstaclesLocator [protected]
 

a reference to the obstacles-locator

Definition at line 136 of file Cognition.h.

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

SelfLocatorSelector* Cognition::pSelfLocator [protected]
 

a reference to the self-locator

Definition at line 139 of file Cognition.h.

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

BehaviorControlSelector* Cognition::pBehaviorControl [protected]
 

a reference to the behavior control

Definition at line 142 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 145 of file Cognition.h.

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

SpecialVision* Cognition::pSpecialVision [protected]
 

a reference to the special vison module

Definition at line 148 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 160 of file Cognition.h.

Referenced by handleMessage().

ColorTable& Cognition::colorTable [protected]
 

the color table

Definition at line 162 of file Cognition.h.

CameraMatrix Cognition::cameraMatrix [protected]
 

The offset and rotation of the camera.

Definition at line 165 of file Cognition.h.

LandmarksPercept Cognition::landmarksPercept [protected]
 

Detected landmarks.

Definition at line 168 of file Cognition.h.

BallPercept Cognition::ballPercept [protected]
 

Detected balls.

Definition at line 171 of file Cognition.h.

PlayersPercept Cognition::playersPercept [protected]
 

Detected players.

Definition at line 174 of file Cognition.h.

ObstaclesPercept Cognition::obstaclesPercept [protected]
 

Detected obstacles.

Definition at line 177 of file Cognition.h.

CollisionPercept Cognition::collisionPercept [protected]
 

The collision percept.

Definition at line 180 of file Cognition.h.

LinesPercept Cognition::linesPercept [protected]
 

Detected lines.

Definition at line 183 of file Cognition.h.

EdgesPercept Cognition::edgesPercept [protected]
 

Detected edges.

Definition at line 186 of file Cognition.h.

BodyPercept Cognition::bodyPercept [protected]
 

Detected switches.

Definition at line 189 of file Cognition.h.

BodyPosture Cognition::bodyPosture [protected]
 

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

Definition at line 192 of file Cognition.h.

PSDPercept Cognition::psdPercept [protected]
 

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

Definition at line 195 of file Cognition.h.

SpecialPercept Cognition::specialPercept [protected]
 

A special percept.

Definition at line 198 of file Cognition.h.

SpecialVisionRequest Cognition::specialVisionRequest [protected]
 

The request for the specialVision module.

Definition at line 201 of file Cognition.h.

CalibrationRequest Cognition::calibrationRequest [protected]
 

The request for calibration.

Definition at line 204 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 207 of file Cognition.h.

TeamMessageCollection Cognition::teamMessageCollection [protected]
 

The team message collection.

Definition at line 210 of file Cognition.h.

BehaviorTeamMessage Cognition::outgoingBehaviorTeamMessage [protected]
 

The outgoing behavior team message.

Definition at line 213 of file Cognition.h.

JoystickData Cognition::joystickData [protected]
 

Data produced by an extern sensor called joystick.

Definition at line 216 of file Cognition.h.

unsigned long Cognition::frameNumber [protected]
 

the color tables

Definition at line 218 of file Cognition.h.

unsigned long Cognition::lastFrameNumber [protected]
 

the color tables

Definition at line 219 of file Cognition.h.


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