Cognition Class Reference

#include <Cognition.h>

Inheritance diagram for Cognition:

Process Sensors PlatformProcess MessageHandler List of all members.

Public Member Functions

 Cognition ()
 ~Cognition ()
virtual int main ()
virtual void init ()
virtual bool handleMessage (InMessage &message)

Protected Attributes

bool processImage
bool processSensorData
bool processPercepts
modules
ColorTableModSelectorpColorTableMod
ImageProcessorSelectorpImageProcessor
SensorDataProcessorSelectorpSensorDataProcessor
CollisionDetectorSelectorpCollisionDetector
RobotStateDetectorSelectorpRobotStateDetector
BallLocatorSelectorpBallLocator
TeamBallLocatorSelectorpTeamBallLocator
PlayersLocatorSelectorpPlayersLocator
ObstaclesLocatorSelectorpObstaclesLocator
SelfLocatorSelectorpSelfLocator
BehaviorControlSelectorpBehaviorControl
SensorBehaviorControlSelectorpSensorBehaviorControl
SpecialVisionpSpecialVision
representations
char colorTableBuffer [sizeof(ColorTable64) > sizeof(ColorTableTSL)?sizeof(ColorTable64) > sizeof(ColorTable32K)?sizeof(ColorTable64):sizeof(ColorTable32K):sizeof(ColorTableTSL) > sizeof(ColorTable32K)?sizeof(ColorTableTSL):sizeof(ColorTable32K)]
ColorTablecolorTable
TaskVisionData taskVisionData
SLAMData slamData
CameraMatrix cameraMatrix
LandmarksPercept landmarksPercept
BallPercept ballPercept
PlayersPercept playersPercept
ObstaclesPercept obstaclesPercept
CollisionPercept collisionPercept
LinesPercept linesPercept
GoalLinesPercept goalLinesPercept
EdgesPercept edgesPercept
BodyPercept bodyPercept
BodyPosture bodyPosture
PSDPercept psdPercept
SpecialPercept specialPercept
SpecialVisionRequest specialVisionRequest
CalibrationRequest calibrationRequest
SampleSetProxy< PoseSampleselfLocatorSamples
TeamMessageCollection teamMessageCollection
BehaviorTeamMessage outgoingBehaviorTeamMessage
JoystickData joystickData
unsigned long frameNumber
unsigned long lastFrameNumber

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 65 of file Cognition.h.


Constructor & Destructor Documentation

Cognition::Cognition (  ) 

constructor

Definition at line 28 of file Cognition.cpp.

References ballPercept, bodyPercept, bodyPosture, calibrationRequest, cameraMatrix, CLUSTERS, collisionPercept, colorTable, Process::debugIn, Process::debugOut, edgesPercept, frameNumber, getLocation(), goalLinesPercept, idText, infile, joystickData, landmarksPercept, lastFrameNumber, linesPercept, Process::moduleHandler, obstaclesPercept, OPTIMIZATIONS, outgoingBehaviorTeamMessage, pBallLocator, pBehaviorControl, pCollisionDetector, pColorTableMod, pImageProcessor, PLAIN_COLORS_ONLY, playersPercept, pObstaclesLocator, pPlayersLocator, pRobotStateDetector, psdPercept, pSelfLocator, pSensorBehaviorControl, pSensorDataProcessor, pSpecialVision, pTeamBallLocator, SCANNING_X, SCANNING_Y, SECTORS, selfLocatorSamples, TeamMessageCollection::setInTeamMessages(), TeamMessageCollection::setOutTeamMessages(), MessageQueue::setSize(), slamData, specialPercept, specialVisionRequest, taskVisionData, teamMessageCollection, text, and TEXTLOG.

Cognition::~Cognition (  ) 

destructor

Definition at line 224 of file Cognition.cpp.

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


Member Function Documentation

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 413 of file Cognition.cpp.

References ballPercept, InMessage::bin, ColorTableTSL::calculateLUT(), cameraMatrix, Sensors::cameraParameters, collisionPercept, colorTableBuffer, d, Process::debugOut, edgesPercept, CameraMatrix::frameNumber, InMessage::getMessageID(), getPlayer(), getRobotConfiguration(), Process::handleMessage(), RobotConfiguration::handleMessage(), ModuleSelector::handleMessage(), 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, joystickData, landmarksPercept, linesPercept, obstaclesPercept, OUTPUT, pBehaviorControl, pImageProcessor, playersPercept, processImage, processPercepts, processSensorData, psdPercept, pSelfLocator, RECEIVE_IMAGE, RECEIVE_PERCEPTS, RECEIVE_WORLDSTATE, Sensors::setCameraParameters(), TeamMessageCollection::setDelay(), specialPercept, teamMessageCollection, GenericDebugData::teamMessageSendDelay, text, and JPEGImage::toImage().

void Cognition::init (  )  [virtual]

is called direct before the first call of main()

Reimplemented from Process.

Definition at line 393 of file Cognition.cpp.

References getPlayer(), Player::getPlayerNumberName(), SystemCall::getRemainingPower(), getRobotConfiguration(), Player::getTeamColorName(), idText, OUTPUT, and text.

int Cognition::main (  )  [virtual]

is called from the framework once in every frame

The frameNumber

Implements Process.

Definition at line 242 of file Cognition.cpp.

References ballPercept, cameraMatrix, collisionPercept, edgesPercept, Module::execute(), ModuleSelector::execute(), frameNumber, SystemCall::getCurrentSystemTime(), getPlayer(), Player::getPlayerNumberName(), SystemCall::getRemainingPower(), Player::getTeamColor(), Player::getTeamColorName(), SystemCall::getTimeSince(), idImage, idJPEGImage, idLowResImage, idOdometryData, idPercepts, idSensorData, idText, idWorldState, ifdef(), INFO, landmarksPercept, lastFrameNumber, linesPercept, obstaclesPercept, outgoingBehaviorTeamMessage, OUTPUT, pBallLocator, pBehaviorControl, pCollisionDetector, pImageProcessor, playersPercept, pObstaclesLocator, pPlayersLocator, pRobotStateDetector, processImage, TeamMessageCollection::processMessages(), TeamMessageCollection::processOutMessages(), processPercepts, processSensorData, psdPercept, pSelfLocator, pSensorBehaviorControl, pSensorDataProcessor, pSpecialVision, pTeamBallLocator, TeamMessageCollection::send(), SEND_IMAGE, SEND_PERCEPTS, SEND_WORLD_STATE, STOP_TIME_ON_REQUEST, teamMessageCollection, text, and WATCH.

Cognition::NET_RECEIVER ( TeamMessage3   )  [private]

Cognition::NET_RECEIVER ( TeamMessage2   )  [private]

Cognition::NET_RECEIVER ( TeamMessage1   )  [private]

Cognition::NET_SENDER ( TeamMessage3   )  [private]

Cognition::NET_SENDER ( TeamMessage2   )  [private]

Cognition::NET_SENDER ( TeamMessage1   )  [private]

Cognition::RECEIVER ( OdometryData   )  [private]

Cognition::RECEIVER ( PackageMotionCognition   )  [private]

Cognition::RECEIVER ( GameControlData   )  [private]

Cognition::RECEIVER ( Image   )  [private]

Cognition::RECEIVER ( SensorDataBuffer   )  [private]

Cognition::SENDER ( PackageCognitionMotion   )  [private]


Member Data Documentation

BallPercept Cognition::ballPercept [protected]

Detected balls

Definition at line 187 of file Cognition.h.

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

BodyPercept Cognition::bodyPercept [protected]

Detected switches

Definition at line 208 of file Cognition.h.

Referenced by Cognition().

BodyPosture Cognition::bodyPosture [protected]

The height and the inclination of the robot's body

Definition at line 211 of file Cognition.h.

Referenced by Cognition().

CalibrationRequest Cognition::calibrationRequest [protected]

The request for calibration

Definition at line 223 of file Cognition.h.

Referenced by Cognition().

CameraMatrix Cognition::cameraMatrix [protected]

The offset and rotation of the camera

Definition at line 181 of file Cognition.h.

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

CollisionPercept Cognition::collisionPercept [protected]

The collision percept

Definition at line 196 of file Cognition.h.

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

ColorTable& Cognition::colorTable [protected]

the color table

Definition at line 172 of file Cognition.h.

Referenced by 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 170 of file Cognition.h.

Referenced by handleMessage().

Cognition::DEBUGGING [private]

Definition at line 68 of file Cognition.h.

EdgesPercept Cognition::edgesPercept [protected]

Detected edges

Definition at line 205 of file Cognition.h.

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

unsigned long Cognition::frameNumber [protected]

Definition at line 237 of file Cognition.h.

Referenced by Cognition(), and main().

GoalLinesPercept Cognition::goalLinesPercept [protected]

Goal Lines

Definition at line 202 of file Cognition.h.

Referenced by Cognition().

JoystickData Cognition::joystickData [protected]

Data produced by an extern sensor called joystick

Definition at line 235 of file Cognition.h.

Referenced by Cognition(), and handleMessage().

LandmarksPercept Cognition::landmarksPercept [protected]

Detected landmarks

Definition at line 184 of file Cognition.h.

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

unsigned long Cognition::lastFrameNumber [protected]

Definition at line 238 of file Cognition.h.

Referenced by Cognition(), and main().

LinesPercept Cognition::linesPercept [protected]

Detected lines

Definition at line 199 of file Cognition.h.

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

ObstaclesPercept Cognition::obstaclesPercept [protected]

Detected obstacles

Definition at line 193 of file Cognition.h.

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

BehaviorTeamMessage Cognition::outgoingBehaviorTeamMessage [protected]

The outgoing behavior team message

Definition at line 232 of file Cognition.h.

Referenced by Cognition(), and main().

BallLocatorSelector* Cognition::pBallLocator [protected]

a reference to the ball-locator

Definition at line 137 of file Cognition.h.

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

BehaviorControlSelector* Cognition::pBehaviorControl [protected]

a reference to the behavior control

Definition at line 152 of file Cognition.h.

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

CollisionDetectorSelector* Cognition::pCollisionDetector [protected]

a reference to the collision detector

Definition at line 131 of file Cognition.h.

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

ColorTableModSelector* Cognition::pColorTableMod [protected]

a reference to the colortable selector

Definition at line 122 of file Cognition.h.

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

ImageProcessorSelector* Cognition::pImageProcessor [protected]

a reference to the image processor

Definition at line 125 of file Cognition.h.

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

PlayersPercept Cognition::playersPercept [protected]

Detected players

Definition at line 190 of file Cognition.h.

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

ObstaclesLocatorSelector* Cognition::pObstaclesLocator [protected]

a reference to the obstacles-locator

Definition at line 146 of file Cognition.h.

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

PlayersLocatorSelector* Cognition::pPlayersLocator [protected]

a reference to the players-locator

Definition at line 143 of file Cognition.h.

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

RobotStateDetectorSelector* Cognition::pRobotStateDetector [protected]

a reference to the robot state detector

Definition at line 134 of file Cognition.h.

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

bool Cognition::processImage [protected]

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

Definition at line 110 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 116 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 113 of file Cognition.h.

Referenced by handleMessage(), and main().

PSDPercept Cognition::psdPercept [protected]

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

Definition at line 214 of file Cognition.h.

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

SelfLocatorSelector* Cognition::pSelfLocator [protected]

a reference to the self-locator

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

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

SensorDataProcessorSelector* Cognition::pSensorDataProcessor [protected]

a reference to the sensor data processor

Definition at line 128 of file Cognition.h.

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

SpecialVision* Cognition::pSpecialVision [protected]

a reference to the special vison module

Definition at line 158 of file Cognition.h.

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

TeamBallLocatorSelector* Cognition::pTeamBallLocator [protected]

a reference to the team ball locator

Definition at line 140 of file Cognition.h.

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

SampleSetProxy<PoseSample> Cognition::selfLocatorSamples [protected]

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

Definition at line 226 of file Cognition.h.

Referenced by Cognition().

SLAMData Cognition::slamData [protected]

SLAM data control structure

Definition at line 178 of file Cognition.h.

Referenced by Cognition().

SpecialPercept Cognition::specialPercept [protected]

A special percept

Definition at line 217 of file Cognition.h.

Referenced by Cognition(), and handleMessage().

SpecialVisionRequest Cognition::specialVisionRequest [protected]

The request for the specialVision module

Definition at line 220 of file Cognition.h.

Referenced by Cognition().

TaskVisionData Cognition::taskVisionData [protected]

controlls the state of taskImageProcessing and selflocalisation

Definition at line 175 of file Cognition.h.

Referenced by Cognition().

TeamMessageCollection Cognition::teamMessageCollection [protected]

The team message collection

Definition at line 229 of file Cognition.h.

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

Cognition::UDP_HANDLER [private]

Definition at line 86 of file Cognition.h.


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:22:53 2006 for DT2005.panorama by  doxygen 1.4.7