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

Processes/CMD/Cognition.cpp

Go to the documentation of this file.
00001 /** 
00002 * @file Processes/CMD/Cognition.cpp
00003 * Implementation of Cognition
00004 *
00005 * @author <a href="mailto:dueffert@informatik.hu-berlin.de">Uwe Düffert</a>
00006 * @author <a href="mailto:juengel@informatik.hu-berlin.de">Matthias Jüngel</a>
00007 * @author <a href="mailto:martin@martin-loetzsch.de">Martin Lötzsch</a>
00008 * @author <a href="mailto:risler@sim.informatik.tu-darmstadt.de">Max Risler</a>
00009 * @author <a href="mailto:roefer@tzi.de">Thomas Röfer</a>
00010 */
00011 
00012 #include "Cognition.h"
00013 #include "Representations/Perception/JPEGImage.h"
00014 #include "Representations/Perception/LowResImage.h"
00015 #include "Tools/Debugging/Stopwatch.h"
00016 #include "Tools/RobotConfiguration.h"
00017 #include "Platform/GTAssert.h"
00018 #include "Tools/Location.h"
00019 
00020 
00021 Cognition::Cognition() : 
00022 INIT_DEBUGGING,
00023 INIT_RECEIVER_SENSORDATA(true),
00024 INIT_RECEIVER_IMAGE(false),
00025 INIT_RECEIVER(GameControlData,false),
00026 INIT_RECEIVER(PackageMotionCognition,false),
00027 INIT_RECEIVER(OdometryData,false),
00028 INIT_NET_RECEIVER(TeamMessage1,false),
00029 INIT_NET_RECEIVER(TeamMessage2,false),
00030 INIT_NET_RECEIVER(TeamMessage3,false),
00031 INIT_NET_SENDER(TeamMessage1,false),
00032 INIT_NET_SENDER(TeamMessage2,false),
00033 INIT_NET_SENDER(TeamMessage3,false),
00034 #ifdef FIVEDOGS
00035 INIT_NET_RECEIVER(TeamMessage4,false),
00036 INIT_NET_SENDER(TeamMessage4,false),
00037 #endif
00038 INIT_SENDER(PackageCognitionMotion,false),
00039 processImage(false),
00040 processSensorData(true),
00041 processPercepts(false),
00042 colorTable((ColorTable&) *colorTableBuffer)
00043 {
00044   frameNumber = 0;
00045   lastFrameNumber = 0;
00046 
00047   //  PRINT("Cognition::Cognition");
00048   debugOut.setSize(200000);
00049   debugIn.setSize(400000);
00050   
00051   // the new colortable selector module is created here
00052   ColorTableModInterfaces colorTableModInterfaces(colorTable);
00053   pColorTableMod = new ColorTableModSelector(moduleHandler, colorTableModInterfaces);
00054   
00055   SensorDataProcessorInterfaces sensorDataProcessorInterfaces(    
00056     theSensorDataBufferReceiver,theImageReceiver.frameNumber, thePackageMotionCognitionReceiver.motionInfo,
00057     bodyPercept, bodyPosture, cameraMatrix, psdPercept);
00058   pSensorDataProcessor = new SensorDataProcessorSelector(moduleHandler, sensorDataProcessorInterfaces);
00059 
00060   //  PRINT("Cognition - SensorDataProcessor created");
00061   
00062   ImageProcessorInterfaces imageProcessorInterfaces(
00063     theImageReceiver,cameraMatrix,colorTable,
00064     thePackageCognitionMotionSender.robotPose,thePackageCognitionMotionSender.ballModel,
00065     thePackageCognitionMotionSender.playerPoseCollection,thePackageCognitionMotionSender.robotState,
00066     calibrationRequest,
00067     landmarksPercept,ballPercept, linesPercept, edgesPercept, playersPercept, obstaclesPercept, specialPercept);
00068   pImageProcessor = new ImageProcessorSelector(moduleHandler, imageProcessorInterfaces);
00069   
00070   //  PRINT("Cognition - ImageProcessor created");
00071   
00072   
00073   RobotStateDetectorInterfaces robotStateDetectorInterfaces(
00074     bodyPercept, collisionPercept, thePackageCognitionMotionSender.robotState);
00075   pRobotStateDetector = new RobotStateDetectorSelector(moduleHandler, robotStateDetectorInterfaces);
00076   
00077   //  PRINT("Cognition - RobotStateDetector created");
00078   
00079   BallLocatorInterfaces ballLocatorInterfaces(
00080     theOdometryDataReceiver,
00081     cameraMatrix, ballPercept, landmarksPercept, thePackageCognitionMotionSender.robotPose, 
00082     calibrationRequest, theSensorDataBufferReceiver, 
00083     thePackageCognitionMotionSender.ballModel);
00084   pBallLocator = new BallLocatorSelector(moduleHandler, ballLocatorInterfaces);
00085   
00086   //  PRINT("Cognition - BallLocator created");
00087   
00088   TeamBallLocatorInterfaces teamBallLocatorInterfaces(
00089     thePackageCognitionMotionSender.ballModel.seen,
00090     theOdometryDataReceiver,thePackageCognitionMotionSender.robotPose, 
00091     teamMessageCollection,thePackageCognitionMotionSender.ballModel.communicated
00092     );
00093   pTeamBallLocator = new TeamBallLocatorSelector(moduleHandler,teamBallLocatorInterfaces);
00094   
00095   //  PRINT("Cognition - TeamBallLocator created");
00096   
00097   PlayersLocatorInterfaces playersLocatorInterfaces(
00098     playersPercept, thePackageCognitionMotionSender.robotPose, 
00099     teamMessageCollection, theOdometryDataReceiver,
00100     thePackageCognitionMotionSender.playerPoseCollection);
00101   pPlayersLocator = new PlayersLocatorSelector(moduleHandler, playersLocatorInterfaces);
00102   
00103   //  PRINT("Cognition - PlayersLocator created");
00104   
00105   ObstaclesLocatorInterfaces obstaclesLocatorInterfaces(
00106     obstaclesPercept, linesPercept, psdPercept, cameraMatrix, theOdometryDataReceiver, thePackageCognitionMotionSender.playerPoseCollection, thePackageCognitionMotionSender.robotPose, thePackageCognitionMotionSender.ballModel,
00107     thePackageCognitionMotionSender.obstaclesModel);
00108   pObstaclesLocator = new ObstaclesLocatorSelector(moduleHandler, obstaclesLocatorInterfaces);
00109   
00110   //  PRINT("Cognition - ObstaclesLocator created");
00111   
00112   SelfLocatorInterfaces selfLocatorInterfaces(
00113     landmarksPercept, linesPercept, edgesPercept, specialPercept,
00114     psdPercept, theOdometryDataReceiver, cameraMatrix, 
00115     thePackageCognitionMotionSender.robotPose, 
00116     selfLocatorSamples, 
00117     thePackageCognitionMotionSender.landmarksState);
00118   pSelfLocator = new SelfLocatorSelector(moduleHandler, selfLocatorInterfaces);
00119   
00120   //  PRINT("Cognition - SelfLocator created");
00121   
00122   const BehaviorControlInterfaces behaviorControlInterfaces(
00123     thePackageCognitionMotionSender.robotPose, 
00124     thePackageCognitionMotionSender.ballModel, 
00125     thePackageCognitionMotionSender.playerPoseCollection, 
00126     thePackageCognitionMotionSender.obstaclesModel, 
00127     thePackageCognitionMotionSender.robotState, 
00128     thePackageMotionCognitionReceiver.motionInfo, 
00129     specialPercept,
00130     teamMessageCollection,
00131     joystickData,
00132     theOdometryDataReceiver,
00133     selfLocatorSamples,
00134     theSensorDataBufferReceiver,
00135     psdPercept,
00136     theGameControlDataReceiver,
00137     thePackageCognitionMotionSender.motionRequest, 
00138     thePackageCognitionMotionSender.ledRequest, 
00139     thePackageCognitionMotionSender.headControlMode, 
00140     thePackageCognitionMotionSender.soundRequest,
00141     thePackageCognitionMotionSender.invKinWalkingParameters,
00142     thePackageCognitionMotionSender.gt2004WalkingParameters,
00143     thePackageCognitionMotionSender.walkParameterTimeStamp,
00144     specialVisionRequest, calibrationRequest, outgoingBehaviorTeamMessage);
00145   
00146   pBehaviorControl = new BehaviorControlSelector(moduleHandler, behaviorControlInterfaces);
00147   
00148   //  PRINT("Cognition - BehaviorControl created");
00149   
00150   
00151   SensorBehaviorControlInterfaces sensorBehaviorControlInterfaces(
00152     theImageReceiver,
00153     theSensorDataBufferReceiver,
00154     cameraMatrix,
00155     colorTable,
00156     theOdometryDataReceiver,
00157     thePackageCognitionMotionSender.robotState,
00158     thePackageCognitionMotionSender.soundRequest, 
00159     thePackageCognitionMotionSender.motionRequest, 
00160     thePackageCognitionMotionSender.ledRequest, 
00161     thePackageCognitionMotionSender.headControlMode
00162     );
00163   pSensorBehaviorControl = new SensorBehaviorControlSelector(moduleHandler, sensorBehaviorControlInterfaces);
00164   
00165   //  PRINT("Cognition - SensorBehaviorControl created");
00166   
00167   SpecialVisionInterfaces specialVisionInterfaces(theImageReceiver,specialVisionRequest,
00168     colorTable, thePackageCognitionMotionSender.robotPose, specialPercept, *this);
00169   pSpecialVision = new DefaultSpecialVision(specialVisionInterfaces);
00170   
00171   //  PRINT("Cognition - SpecialVision created");
00172   
00173   CollisionDetectorInterfaces collisionDetectorInterfaces(theSensorDataBufferReceiver, 
00174     thePackageMotionCognitionReceiver.motionInfo, collisionPercept);
00175   pCollisionDetector = new CollisionDetectorSelector(moduleHandler, collisionDetectorInterfaces);
00176   
00177   //  PRINT("Cognition - CollisionDetection created");
00178   
00179   /* Init für bessere "TeamMessageCollection" */
00180   teamMessageCollection.setInTeamMessages(theTeamMessage1Receiver);
00181   teamMessageCollection.setOutTeamMessages(theTeamMessage1Sender);
00182   teamMessageCollection.setInTeamMessages(theTeamMessage2Receiver);
00183   teamMessageCollection.setOutTeamMessages(theTeamMessage2Sender);
00184   teamMessageCollection.setInTeamMessages(theTeamMessage3Receiver);
00185   teamMessageCollection.setOutTeamMessages(theTeamMessage3Sender);
00186 #ifdef FIVEDOGS
00187   teamMessageCollection.setInTeamMessages(theTeamMessage4Receiver);
00188   teamMessageCollection.setOutTeamMessages(theTeamMessage4Sender);
00189 #endif
00190 }
00191 
00192 
00193 Cognition::~Cognition()
00194 {
00195   delete pImageProcessor;
00196   delete pSensorDataProcessor;
00197   delete pRobotStateDetector;
00198   delete pBallLocator;
00199   delete pTeamBallLocator;
00200   delete pPlayersLocator;
00201   delete pObstaclesLocator;
00202   delete pSelfLocator;
00203   delete pBehaviorControl;
00204   delete pSensorBehaviorControl;
00205   delete pSpecialVision;
00206   delete pCollisionDetector;
00207   delete pColorTableMod;
00208 }
00209 
00210 
00211 int Cognition::main() 
00212 {
00213 #ifndef _WIN32
00214   theUDPHandler.doRegularStuff();
00215 
00216   if (SystemCall::getTimeSince(thePackageMotionCognitionReceiver.timeStamp) > 2000)
00217   {
00218     OUTPUT(idText, text, "Cognition: no packages from Motion for 2000ms");
00219   }
00220 #endif
00221 
00222   
00223   WATCH(sendSensorData,idSensorData,bin,theSensorDataBufferReceiver);
00224   
00225   if (theSensorDataBufferReceiver.receivedNew()) processSensorData = true;
00226   
00227   if (processSensorData)
00228   {
00229     STOP_TIME_ON_REQUEST(sensorDataProcessor, pSensorDataProcessor->execute(); );
00230     STOP_TIME_ON_REQUEST(collisionDetector, pCollisionDetector->execute(); );
00231     STOP_TIME_ON_REQUEST(robotStateDetector, pRobotStateDetector->execute(); );
00232   }
00233   
00234   if (theImageReceiver.receivedNew()) 
00235   {
00236     processImage = true;
00237     frameNumber = theImageReceiver.frameNumber;
00238   }
00239   //  OUTPUT(idText, text, "image frame number" << theImageReceiver.frameNumber << " " << processImage);
00240   //  OUTPUT(idText, text, "num of frames" << theSensorDataBufferReceiver.numOfFrames << " " << processSensorData);
00241   
00242   if (!processImage && !theDebugReceiver.receivedNew())
00243     return 0; // the process received SensorData but not an image
00244   
00245   teamMessageCollection.processMessages();
00246   
00247   INFO(sendOdometryData,idOdometryData,bin,theOdometryDataReceiver);
00248   
00249   INFO(sendPlayerConfig,idText,text,"player: " << Player::getTeamColorName(getPlayer().getTeamColor())
00250     << " " << Player::getPlayerNumberName(getPlayer().getPlayerNumber()));
00251   
00252   if (processImage) 
00253   {
00254     WATCH(sendImage,idImage,bin,SEND_IMAGE(theImageReceiver,cameraMatrix));
00255     INFO(sendJPEGImage,idJPEGImage,bin,JPEGImage(theImageReceiver) << cameraMatrix);
00256     INFO(sendLowResImage,idLowResImage,bin,LowResImage(theImageReceiver) << cameraMatrix);
00257     STOP_TIME_ON_REQUEST(imageProcessor, pImageProcessor->execute(); );
00258     STOP_TIME_ON_REQUEST(specialVision,  pSpecialVision->execute();  );
00259     processPercepts = true;
00260   }
00261   
00262   if (processPercepts)
00263   {
00264     STOP_TIME_ON_REQUEST(selfLocator, pSelfLocator->execute();  );
00265     STOP_TIME_ON_REQUEST(ballLocator, pBallLocator->execute();  );
00266     STOP_TIME_ON_REQUEST(teamBallLocator, pTeamBallLocator->execute();  );
00267     STOP_TIME_ON_REQUEST(playersLocator, pPlayersLocator->execute(); );
00268     STOP_TIME_ON_REQUEST(obstaclesLocator, pObstaclesLocator->execute(); );
00269   }
00270   
00271   WATCH(sendWorldState,idWorldState,bin,SEND_WORLD_STATE(
00272     thePackageCognitionMotionSender.robotPose,
00273     thePackageCognitionMotionSender.ballModel,
00274     thePackageCognitionMotionSender.playerPoseCollection,
00275     thePackageCognitionMotionSender.obstaclesModel,
00276     thePackageCognitionMotionSender.robotState,
00277     cameraMatrix,
00278     theImageReceiver.cameraInfo
00279     ));
00280   WATCH(sendPercepts,idPercepts,bin,SEND_PERCEPTS(cameraMatrix, theImageReceiver.cameraInfo,
00281     ballPercept,landmarksPercept,linesPercept,edgesPercept,playersPercept, obstaclesPercept, psdPercept, collisionPercept));
00282   
00283   STOP_TIME_ON_REQUEST(behaviorControl,  pBehaviorControl->execute();  );
00284   STOP_TIME_ON_REQUEST(sensorBehaviorControl, pSensorBehaviorControl->execute();  );
00285   INFO(sendSpecialPercept, idSpecialPercept, bin, getPlayer() << specialPercept << cameraMatrix);
00286 
00287   /** The frameNumber */
00288 
00289   if( (frameNumber - lastFrameNumber) > 5 ) 
00290   {
00291     thePackageCognitionMotionSender.ledRequest.showCognitionFrameLostWarning = true;
00292   }
00293   else
00294   {
00295     thePackageCognitionMotionSender.ledRequest.showCognitionFrameLostWarning = false;
00296   }
00297   lastFrameNumber = frameNumber;
00298 
00299   
00300   thePackageCognitionMotionSender.teamColor = getPlayer().getTeamColor();
00301   
00302   thePackageCognitionMotionSender.wLanStatus = 0;
00303   
00304   if (theTeamMessage1Receiver.isActual()) thePackageCognitionMotionSender.wLanStatus += 1;
00305   if (theTeamMessage2Receiver.isActual()) thePackageCognitionMotionSender.wLanStatus += 2;
00306   if (theTeamMessage3Receiver.isActual()) thePackageCognitionMotionSender.wLanStatus += 4;
00307   
00308 #ifdef FIVEDOGS
00309   if (theTeamMessage4Receiver.isActual()) thePackageCognitionMotionSender.wLanStatus += 8;
00310 #endif
00311   
00312   thePackageCognitionMotionSender.timeStamp = SystemCall::getCurrentSystemTime();
00313   
00314   thePackageCognitionMotionSender.send();
00315   
00316   INFO(sendGameControlData,idText,text,"GameControlData: state: " << theGameControlDataReceiver.getStateName(theGameControlDataReceiver.data.state)
00317     << ", kickoff: " << theGameControlDataReceiver.getKickoffName(theGameControlDataReceiver.data.kickoff)
00318     //    << ", team color: " << theGameControlDataReceiver.getTeamColorName(theGameControlDataReceiver.data.teamColor)
00319     << ", own score: " << theGameControlDataReceiver.data.ownScore);
00320   //    << ", opponent score: " << theGameControlDataReceiver.data.opponentScore
00321   //    << ", penalty: "<< theGameControlDataReceiver.getPenaltyName(theGameControlDataReceiver.data.penalty));
00322   
00323   theDebugSender.send();
00324   
00325   teamMessageCollection.send (thePackageCognitionMotionSender.robotPose);
00326   teamMessageCollection.send (thePackageCognitionMotionSender.ballModel.seen);
00327   teamMessageCollection.send (outgoingBehaviorTeamMessage);
00328   
00329   if ( (teamMessageCollection.processOutMessages())) { 
00330     theTeamMessage1Sender.send();
00331     theTeamMessage2Sender.send();
00332     theTeamMessage3Sender.send();
00333 #ifdef FIVEDOGS
00334     theTeamMessage4Sender.send();
00335 #endif
00336   }
00337   
00338   processImage = false;
00339   processPercepts = false;
00340   processSensorData = true;
00341   
00342   return 0;
00343 }
00344 
00345 
00346 void Cognition::init()
00347 {
00348   INIT_UDP_HANDLER(TeamMessage1);
00349   INIT_UDP_HANDLER(TeamMessage2);
00350   INIT_UDP_HANDLER(TeamMessage3);
00351 #ifdef FIVEDOGS
00352   INIT_UDP_HANDLER(TeamMessage4);
00353 #endif
00354   START_UDP_HANDLER;
00355   // !!! don't remove that lines, it is needed to trigger the Debug process to send 
00356   // debug requests back.
00357   OUTPUT(idText,text,"player: " << Player::getTeamColorName(getPlayer().getTeamColor())
00358     << " " << Player::getPlayerNumberName(getPlayer().getPlayerNumber())
00359     << ", MAC Address: " << getRobotConfiguration().getMacAddressString());
00360 }
00361 
00362 
00363 bool Cognition::handleMessage(InMessage& message)
00364 {
00365   switch (message.getMessageID())
00366   {
00367   case idSensorData:
00368     message.bin >> theSensorDataBufferReceiver;
00369     processSensorData = true;
00370     return true;
00371   case idImage:
00372     message.bin >> RECEIVE_IMAGE(theImageReceiver,cameraMatrix);
00373     cameraMatrix.frameNumber = theImageReceiver.frameNumber;
00374     processImage = true;
00375     processSensorData = false;
00376     return true;
00377   case idJPEGImage:
00378     {
00379       JPEGImage jpe;
00380       message.bin >> jpe >> cameraMatrix;
00381       jpe.toImage(theImageReceiver);
00382       cameraMatrix.frameNumber = theImageReceiver.frameNumber;
00383       processImage = true;
00384       processSensorData = false;
00385       return true;
00386     }
00387   case idLowResImage:
00388     {
00389       LowResImage lrImage(theImageReceiver);
00390       message.bin >> lrImage >> cameraMatrix;
00391       // cameraMatrix.frameNumber = lrImage.frameNumber;
00392       return true;
00393     }
00394   case idPercepts:
00395     {
00396       Player pl;
00397       message.bin >> RECEIVE_PERCEPTS(cameraMatrix, theImageReceiver.cameraInfo, ballPercept,landmarksPercept,
00398         linesPercept, edgesPercept,playersPercept, obstaclesPercept, psdPercept, collisionPercept);
00399       processPercepts = true;
00400       return true;
00401     }
00402   case idWorldState:
00403     {
00404       Player pl;
00405       message.bin >> RECEIVE_WORLDSTATE(thePackageCognitionMotionSender.robotPose,
00406         thePackageCognitionMotionSender.ballModel,
00407         thePackageCognitionMotionSender.playerPoseCollection,
00408         thePackageCognitionMotionSender.obstaclesModel,
00409         thePackageCognitionMotionSender.robotState,
00410         cameraMatrix,
00411         theImageReceiver.cameraInfo);
00412         cameraMatrix.frameNumber = theImageReceiver.frameNumber;
00413       return true;
00414     }
00415   case idHeadControlMode:
00416     message.bin >> thePackageCognitionMotionSender.headControlMode;
00417     return true;
00418   case idMotionRequest:
00419     message.bin >> thePackageCognitionMotionSender.motionRequest;
00420     return true;
00421   case idLEDRequest:
00422     message.bin >> thePackageCognitionMotionSender.ledRequest;
00423     return true;
00424   case idGlobalGameControlData:
00425     {
00426       GlobalGameControlData ggcd;
00427       message.bin >> ggcd;
00428       theGameControlDataReceiver.translateFromGlobalGameControlData(ggcd,getPlayer());
00429     }
00430     return true;
00431   case idGameControlData:
00432     message.bin >> theGameControlDataReceiver;
00433     return true;
00434   case idSoundRequest:
00435     message.bin >> thePackageCognitionMotionSender.soundRequest;
00436     return true;
00437   case idSpecialPercept:
00438     {
00439       Player pl;
00440       CameraMatrix cm;
00441       message.bin >> pl >> specialPercept >> cm;
00442       // ???? cameraMatrix.frameNumber = theImageReceiver.frameNumber; ????
00443       processPercepts = true;
00444       return true;
00445     }
00446   case idOracledWorldState:
00447     {
00448       // send an oracled world state immediately back for paint synchronization
00449       message >> debugOut;
00450       return true;
00451     }
00452   case idCameraParameters:
00453     {
00454       message.bin >> cameraParameters;
00455       this->setCameraParameters(cameraParameters);
00456       return true;
00457     }
00458   case idColorTable64:
00459     {
00460       ColorTable64 colorTable64;
00461       message.bin >> colorTable64;
00462       memcpy(colorTableBuffer,&colorTable64,sizeof(ColorTable64));
00463       processImage = true;
00464       pImageProcessor->handleMessage(message);
00465       OUTPUT(idText,text,"Using ColorTable64");
00466       return true;
00467     }
00468   case idColorTableTSL:
00469     {
00470       ColorTableTSL colorTableTSL;
00471       message.bin >> colorTableTSL;
00472       colorTableTSL.calculateLUT();
00473       memcpy(colorTableBuffer,&colorTableTSL,sizeof(ColorTableTSL));
00474       processImage = true;
00475       OUTPUT(idText,text,"Using ColorTableTSL");
00476       return true;
00477     }
00478   case idLinesSelfLocatorParameters:
00479     {
00480       pSelfLocator->handleMessage(message);
00481       return true;
00482     }
00483   case idXabsl2DebugRequest:
00484   case idTacticEntryArray:
00485   case idFreezeRequest:
00486   case idKickSelectionTable:
00487   case idGT2004EvolutionRequest:
00488   case idGT2004Parameters:
00489     pBehaviorControl->handleMessage(message);
00490     return true;
00491   case idJoystickData:
00492     message.bin >> joystickData;
00493     return true;
00494   case idBodyOffsets:
00495     getRobotConfiguration().handleMessage(message);
00496     return true;
00497   case idGenericDebugData:
00498     {
00499       GenericDebugData d;
00500       message.bin >> d;
00501       if(d.id == GenericDebugData::teamMessageSendDelay)
00502       {
00503         OUTPUT(idText,text,"generic debug message (teamMessageSendDeley) - set Delay to " << d.data[0]);
00504         teamMessageCollection.setDelay( (int)floor(d.data[0]));
00505       }
00506     }
00507     return true;
00508   default:
00509     {
00510       return Process::handleMessage(message);
00511     }
00512   }
00513 }
00514 
00515 MAKE_PROCESS(Cognition);
00516 
00517 /*
00518 * Change log :
00519 * 
00520 * $Log: Cognition.cpp,v $
00521 * Revision 1.24  2004/07/22 22:38:21  kerdels
00522 * added DTT used by Open Challenge, RIP and Xabsl-Options will follow
00523 *
00524 * Revision 1.23  2004/07/10 00:13:55  spranger
00525 * renaming for coderelease and preparations for gt2005
00526 *
00527 * Revision 1.22  2004/06/28 12:03:08  kerdels
00528 * added a Special Vision AutoShutter...
00529 *
00530 * Revision 1.21  2004/06/28 11:54:56  wachter
00531 * Added Special-Vision classes for Challenge
00532 *
00533 * Revision 1.20  2004/06/27 17:04:42  nistico
00534 * ColorTableMod works again, now ColorTable32K are converted when selected
00535 * into ColorTable64 format, and can be selected at runtime what to use.
00536 *
00537 * Revision 1.19  2004/06/21 18:05:23  dueffert
00538 * smarter recognition of missing packages between Motion and Cognition
00539 *
00540 * Revision 1.18  2004/06/17 17:36:12  spranger
00541 * - added timeStamp to package motioncognition
00542 * - OUTPUT when Motion is not returning packages
00543 *
00544 * Revision 1.17  2004/06/17 15:52:06  nistico
00545 * Added visualization of camera motion vector on image
00546 * Fixed cameraMatrix.frameNumber=0 problem when playing logfiles
00547 * (the image frame number is copied)
00548 *
00549 * Revision 1.16  2004/06/15 17:49:38  juengel
00550 * Added frameLostWarning.
00551 *
00552 * Revision 1.15  2004/06/15 10:58:27  thomas
00553 * added edge-specialist, edges-percept, debug-drawings etc. (not yet called from image-processor)
00554 *
00555 * Revision 1.14  2004/06/03 14:37:37  dueffert
00556 * initialization of package moved to package: should fix wrong InvKin parameters bug
00557 *
00558 * Revision 1.13  2004/05/27 10:25:18  loetzsch
00559 * removed all prepocessor directives NO_COLOR_TABLE_SELECTOR
00560 *
00561 * Revision 1.12  2004/05/27 10:08:08  thomas
00562 * added model-specific locations
00563 *
00564 * Revision 1.11  2004/05/27 09:53:33  loetzsch
00565 * removed "timeOfImageProcessing"
00566 *
00567 * Revision 1.10  2004/05/27 09:09:19  loetzsch
00568 * clean up in the interfaces
00569 *
00570 * Revision 1.9  2004/05/26 18:56:41  loetzsch
00571 * clean up in the behavior control interfaces
00572 *
00573 * Revision 1.8  2004/05/26 17:31:34  dueffert
00574 * better data types used
00575 *
00576 * Revision 1.7  2004/05/26 15:18:44  juengel
00577 * Added BodyPosture.
00578 *
00579 * Revision 1.6  2004/05/26 09:28:41  roefer
00580 * Make the Simulator compile
00581 *
00582 * Revision 1.5  2004/05/24 17:03:45  wachter
00583 * Added GenerigDebugData for setting team-communication delay.
00584 *
00585 * Revision 1.4  2004/05/22 22:52:02  juengel
00586 * Renamed ballP_osition to ballModel.
00587 *
00588 * Revision 1.3  2004/05/22 21:53:30  juengel
00589 * Removed some MessageIDs.
00590 *
00591 * Revision 1.2  2004/05/22 20:47:44  juengel
00592 * Removed some MessageIDs.
00593 *
00594 * Revision 1.1.1.1  2004/05/22 17:24:56  cvsadm
00595 * created new repository GT2004_WM
00596 *
00597 * Revision 1.58  2004/05/14 14:12:08  wachter
00598 * - Added communication support for 5 robots
00599 * - rewrote parts of team-communication to be faster and more stable
00600 *
00601 * Revision 1.57  2004/04/16 14:57:39  dueffert
00602 * cleanup for Martins data flow graphics
00603 *
00604 * Revision 1.56  2004/04/14 06:37:16  loetzsch
00605 * removed the hack "kickInProgress" from the BehaviorControlInterfaces
00606 *
00607 * Revision 1.55  2004/04/11 18:49:45  roefer
00608 * Team color is sent again from Cognition to Motion.
00609 * Otherwise, messages sent by Motion may contain the wrong team color.
00610 *
00611 * Revision 1.54  2004/04/09 11:35:53  roefer
00612 * Bremen Byters German Open check-in
00613 *
00614 * Revision 1.53  2004/04/08 15:33:07  wachter
00615 * GT04 checkin of Microsoft-Hellounds
00616 *
00617 * Revision 1.52  2004/04/07 14:42:56  risler
00618 * moved LandsmarksState to Cognition directory, generated by SelfLocator
00619 *
00620 * Revision 1.51  2004/04/07 13:00:47  risler
00621 * ddd checkin after go04 - second part
00622 *
00623 * Revision 1.3  2004/04/07 11:44:06  risler
00624 * added sending low res images
00625 * added Image::setCameraInfo
00626 *
00627 * Revision 1.2  2004/04/01 19:52:43  Charlie
00628 * added LandmarkState
00629 *
00630 * Revision 1.1.1.1  2004/03/29 08:28:46  Administrator
00631 * initial transfer from tamara
00632 *
00633 * Revision 1.50  2004/04/07 11:40:18  dueffert
00634 * calibration reset bug fixed
00635 *
00636 * Revision 1.49  2004/04/05 17:56:47  loetzsch
00637 * merged the local German Open CVS of the aibo team humboldt with the tamara CVS
00638 *
00639 * Revision 1.2  2004/04/02 10:02:40  jumped
00640 * changed balllocatorinterface
00641 *
00642 * Revision 1.1.1.1  2004/03/31 11:16:52  loetzsch
00643 * created ATH repository for german open 2004
00644 *
00645 * Revision 1.48  2004/03/30 11:57:30  dueffert
00646 * first useful evolutionMode implementation (0=none, 1=auto); receiving parameters improved; beautified
00647 *
00648 * Revision 1.47  2004/03/29 15:32:01  dueffert
00649 * evolution mode idea added
00650 *
00651 * Revision 1.46  2004/03/27 14:45:08  loetzsch
00652 * removed team color from PackageCognitionMotion
00653 *
00654 * Revision 1.45  2004/03/21 12:39:30  juengel
00655 * Added CalibrationRequest to BallLocatorInterfaces.
00656 *
00657 * Revision 1.44  2004/03/19 16:41:21  dueffert
00658 * output improved
00659 *
00660 * Revision 1.43  2004/03/19 09:30:18  dueffert
00661 * handling for iDUDParameters added
00662 *
00663 * Revision 1.42  2004/03/17 19:53:36  juengel
00664 * Added idKickSelectionTable.
00665 *
00666 * Revision 1.41  2004/03/17 16:31:20  kerdels
00667 * added boolean input symbol "robot-pose.something-in-front-of-chest" utilizing the chest distance sensor
00668 *
00669 * Revision 1.40  2004/03/17 16:18:49  thomas
00670 * added preversion of motion optimisation with behaviour, selflocator, headcontrol and robotcontrol dialog
00671 *
00672 * Revision 1.39  2004/03/16 16:00:09  tim
00673 * Added SensorDataBuffer to BehaviorControlInterfaces
00674 *
00675 * Revision 1.38  2004/03/16 12:39:43  dueffert
00676 * typo fixed
00677 *
00678 * Revision 1.37  2004/03/16 10:24:36  dueffert
00679 * output improved
00680 *
00681 * Revision 1.36  2004/03/15 12:50:31  tim
00682 * Adaptions to new GameController
00683 *
00684 * Revision 1.35  2004/03/15 12:36:53  dueffert
00685 * measurement of free choosen MotionRequest allowed now
00686 *
00687 * Revision 1.34  2004/03/11 00:01:34  roefer
00688 * OUTPUT removed
00689 *
00690 * Revision 1.33  2004/03/10 12:17:50  roefer
00691 * Player bug fixed
00692 *
00693 * Revision 1.32  2004/03/09 10:41:12  dueffert
00694 * compilability restored; tim: please update GameControlData if you wanna use new features
00695 *
00696 * Revision 1.31  2004/03/09 08:04:43  dueffert
00697 * initialization added, comments corrected
00698 *
00699 * Revision 1.30  2004/03/08 15:29:08  tim
00700 * Sending the Player object to the Motion process
00701 *
00702 * Revision 1.29  2004/03/04 10:05:24  jhoffman
00703 * - motion process now uses odometry to propagate the robot pose while no new robot pose is being sent (this makes headcontrol a little better)
00704 * - removed headcontrol member variable "propagatedPose" from headcontrol and cognition->motion-sender
00705 *
00706 * Revision 1.28  2004/03/03 08:30:18  dueffert
00707 * two UDEvolutionRequests added and bug fixed
00708 *
00709 * Revision 1.27  2004/02/29 13:38:47  dueffert
00710 * symmetries in UDParametersSet handled
00711 *
00712 * Revision 1.26  2004/02/27 16:42:14  dueffert
00713 * UDEvolutionRequest introduced
00714 *
00715 * Revision 1.25  2004/02/23 16:48:50  dueffert
00716 * several improvements for measurement of walking
00717 *
00718 * Revision 1.24  2004/02/18 14:49:59  dueffert
00719 * behavior control can now change walking parameters
00720 *
00721 * Revision 1.23  2004/02/16 18:56:32  tim
00722 * Notification of ImageProcessor in case of new ColorTable64
00723 *
00724 * Revision 1.22  2004/02/16 17:57:43  dueffert
00725 * packageCognitionMotion extended with invkin parameters
00726 *
00727 * Revision 1.21  2004/02/01 12:30:41  nistico
00728 * Fixed compilation problem when NO_COLOR_TABLE_SELECTOR is defined, after the memory leak was fixed
00729 *
00730 * Revision 1.20  2004/01/31 10:30:11  roefer
00731 * Memory leak closed
00732 *
00733 * Revision 1.19  2004/01/30 15:44:33  nistico
00734 * Created a Color Table Selector, which permits to switch color tables at run time using the same image processor.
00735 * If your image processor was designed to use only ColorTable64, leave it as the default choice and you should
00736 * (hopefully) have no problems.
00737 * In case of trouble, i put a conditional compilation switch in SolutionRequest.h, simply uncomment the definition of NO_COLOR_TABLE_SELECTOR; in that case, the code should get back to the original solution, but the coltable which will be looked upon first for loading will be ColorTable64 (as it's the default solution), so there's no reason anymore to remove the other color tables from the CVS.
00738 *
00739 * Revision 1.18  2004/01/26 14:14:50  wachter
00740 * activated direct team-communication
00741 *
00742 * Revision 1.17  2004/01/20 23:09:49  loetzsch
00743 * bug fix
00744 *
00745 * Revision 1.16  2004/01/20 12:40:08  nistico
00746 * - Added support for ColorTable32K (65K elements in packed format)
00747 * - RobotControl can now convert GT *.log files into AIBOVision (external ColorTable32K calibration tool) *.amv file format
00748 *
00749 * Revision 1.15  2004/01/17 14:39:22  kerdels
00750 * modified idTacitcEntryArray Message routing
00751 *
00752 * Revision 1.14  2004/01/10 10:09:14  juengel
00753 * Added CameraInfo to and removed Player from (SEND|RECEIVE)_(PERCEPTS|WORLDSTATE).
00754 *
00755 * Revision 1.13  2003/12/09 16:30:19  jhoffman
00756 * robotState is now being send to sensorbehaviorcontrols
00757 *
00758 * Revision 1.12  2003/12/06 17:45:33  loetzsch
00759 * replaced Player::playerRole (goalie, defender, striker1, striker2)
00760 * by Player::playerNumber (one, two, three, four)
00761 *
00762 * Revision 1.11  2003/12/06 06:31:19  loetzsch
00763 * no message
00764 *
00765 * Revision 1.10  2003/11/29 07:40:19  roefer
00766 * Doxygen comments corrected
00767 *
00768 * Revision 1.9  2003/11/24 15:31:20  dueffert
00769 * SpecialPercept removed from PackageCognition
00770 *
00771 * Revision 1.8  2003/11/14 19:02:26  goehring
00772 * frameNumber added
00773 *
00774 * Revision 1.7  2003/11/11 13:16:37  loetzsch
00775 * corrected message handling for special percepts
00776 * moved invocation of special vision upward
00777 *
00778 * Revision 1.6  2003/11/11 10:46:21  loetzsch
00779 * removed the
00780 * #ifdef APERIOS1_3_2
00781 * statement
00782 *
00783 * Revision 1.5  2003/11/10 13:37:42  dueffert
00784 * checkerboard localization improved
00785 *
00786 * Revision 1.4  2003/11/05 16:41:39  goehring
00787 * no message
00788 *
00789 * Revision 1.3  2003/11/05 16:34:40  goehring
00790 * FrameNumber added
00791 *
00792 * Revision 1.2  2003/10/12 11:48:14  juengel
00793 * Added CalibrationRequest.
00794 *
00795 * Revision 1.1  2003/10/07 10:07:00  cvsadm
00796 * Created GT2004 (M.J.)
00797 *
00798 * Revision 1.7  2003/09/26 21:23:20  loetzsch
00799 * renamed class JointState to CollisionPercept
00800 *
00801 * Revision 1.6  2003/09/26 15:30:38  juengel
00802 * Renamed DataTypes to representations.
00803 *
00804 * Revision 1.5  2003/09/26 11:41:17  juengel
00805 * - sorted tools
00806 * - clean-up in DataTypes
00807 *
00808 * Revision 1.4  2003/07/30 14:59:36  dueffert
00809 * SpecialPerceptSelfLocator for checkerboard implemented
00810 *
00811 * Revision 1.3  2003/07/05 09:49:05  roefer
00812 * Generic debug message for bodyOffsets improved
00813 *
00814 * Revision 1.2  2003/07/02 20:42:11  loetzsch
00815 * bug fix
00816 *
00817 * Revision 1.1.1.1  2003/07/02 09:40:25  cvsadm
00818 * created new repository for the competitions in Padova from the 
00819 * tamara CVS (Tuesday 2:00 pm)
00820 *
00821 * removed unused solutions
00822 *
00823 * Revision 1.84  2003/06/21 12:50:18  juengel
00824 * Added STOP_TIME_ON_REQUEST for collision detector and robotState detector.
00825 *
00826 * Revision 1.83  2003/06/20 20:21:17  goehring
00827 * ExecutedMotionReques instead of MotionRequest implemented for CollisionDetector
00828 *
00829 * Revision 1.82  2003/06/18 19:35:32  goehring
00830 * RobotStateDetectorInterfaces extended by JointState
00831 *
00832 * Revision 1.81  2003/06/18 13:57:46  juengel
00833 * Added ballP_osition to ObstaclesLocatorInterfaces.
00834 *
00835 * Revision 1.80  2003/06/17 19:55:41  risler
00836 * timeOfImageProcessing initialisation
00837 *
00838 * Revision 1.79  2003/06/15 22:42:21  loetzsch
00839 * no message
00840 *
00841 * Revision 1.78  2003/06/10 15:03:23  goehring
00842 * JointState added
00843 *
00844 * Revision 1.77  2003/06/02 09:39:34  goehring
00845 * Added JointState to SEND_PERCEPTS and RECEIVE_PERCEPTS.
00846 *
00847 * Revision 1.76  2003/05/27 12:23:42  risler
00848 * added GT2003BehaviorConfiguration debug message
00849 *
00850 * Revision 1.75  2003/05/26 08:27:56  juengel
00851 * Added cameraMatrix to worldState.
00852 *
00853 * Revision 1.74  2003/05/23 09:31:39  goehring
00854 * CollisionDetector - Interface extended to MotionRequest
00855 *
00856 * Revision 1.73  2003/05/18 22:36:44  loetzsch
00857 * changes in the ::init() function by Matthias Jüngel
00858 *
00859 * Revision 1.72  2003/05/13 11:41:45  goehring
00860 * CollisionDetector added
00861 *
00862 * Revision 1.71  2003/05/12 14:08:39  brunn
00863 * renamed selfLocationSampleSetProxy to selfLocatorSamples
00864 * "Ha, glad am I that no one knew that Rumpelstiltskin I am styled"
00865 *
00866 * Revision 1.70  2003/05/12 12:28:12  brunn
00867 * renamed sampleSetProxy to selfLocationSampleSetProxy
00868 * added selfLocationSampleSetProxy to BehaviourControl-Interfaces
00869 *
00870 * Revision 1.69  2003/05/11 17:03:00  risler
00871 * added location.cfg
00872 *
00873 * Revision 1.68  2003/05/08 23:52:24  roefer
00874 * SampleSet and SampleSetProxy added
00875 *
00876 * Revision 1.67  2003/05/08 13:20:22  loetzsch
00877 * added the execution of the team ball locator to the Cognition process
00878 *
00879 * Revision 1.66  2003/05/06 16:47:22  juengel
00880 * Increased size of debugIn.
00881 *
00882 * Revision 1.65  2003/05/05 14:47:57  risler
00883 * idJointData debug message sends JointDataBuffer
00884 * JointViewerDlg shows reference values
00885 *
00886 * Revision 1.64  2003/05/05 12:44:12  juengel
00887 * no message
00888 *
00889 * Revision 1.63  2003/05/05 12:41:24  juengel
00890 * Removed idGridImageProcessor2Thresholds
00891 *
00892 * Revision 1.62  2003/05/03 16:21:09  roefer
00893 * Destructor call for TeamBallLocator added
00894 *
00895 * Revision 1.61  2003/05/02 18:15:18  risler
00896 * SensorDataBuffer added
00897 * replaced SensorData with SensorDataBuffer
00898 * full SensorData resolution now accessible
00899 *
00900 * Revision 1.60  2003/05/02 12:57:13  loetzsch
00901 * TeamMessage now contains a SeenBallPosition instead of a BallPercept
00902 *
00903 * Revision 1.59  2003/05/01 17:09:08  loetzsch
00904 * Redesign of ball modeling:
00905 * - Modularized class BallPosition
00906 * - splitted up module "BallLocator" into "BallLocator" for modeling of percepts
00907 *   and "TeamBallLocator" for modelling communicated positions
00908 * - Removed solution JumpingBallLocator
00909 * - Splitted Solution DefaultBallLocator into DefaultBallLocator and DefaultTeamBallLocator
00910 * - Renamed SensorFusionBallLocator to GaussBellTeamBallLocator
00911 *
00912 * Revision 1.58  2003/04/16 14:14:38  loetzsch
00913 * removed Xabsl 1 from GT2003
00914 *
00915 * Revision 1.57  2003/04/14 16:23:27  loetzsch
00916 * ATH after GermanOpen CVS merge
00917 * added new proposal for sending the ball percept to other players
00918 *
00919 * Revision 1.56  2003/04/06 15:05:42  loetzsch
00920 * Matthias added LinesPercept to ObstaclesLocatorInterfaces
00921 *
00922 * Revision 1.55  2003/04/05 16:49:49  juengel
00923 * Added specialPercept to DrawingMethods.
00924 *
00925 * Revision 1.54  2003/04/03 17:35:51  dueffert
00926 * free part of goal kick added
00927 *
00928 * Revision 1.53  2003/03/31 04:04:03  osterhues
00929 * Added "coltable.tsl" loading mechanism
00930 * handleMessage() now notifies user which color table is used
00931 *
00932 * Revision 1.52  2003/03/28 14:31:34  juengel
00933 * Added PSDPercept to SEND_PERCEPTS and RECEIVE_PERCEPTS.
00934 *
00935 * Revision 1.51  2003/03/27 03:21:54  deutsch
00936 * no message
00937 *
00938 * Revision 1.50  2003/03/25 10:50:24  juengel
00939 * WATCH and INFO macros for image and JPEGImage are only reached, when processImage is true.
00940 *
00941 * Revision 1.49  2003/03/22 16:56:34  juengel
00942 * Added PSDPercept to ObstaclesLocatorInterfaces.
00943 *
00944 * Revision 1.48  2003/03/20 20:33:41  loetzsch
00945 * removed some hacks
00946 *
00947 * Revision 1.47  2003/03/19 15:40:41  jhoffman
00948 * GL simulator support improved
00949 *
00950 * Revision 1.46  2003/03/15 13:24:30  juengel
00951 * Added CameraMatrix to ObstaclesLocatorInterfaces
00952 *
00953 * Revision 1.45  2003/03/12 22:27:16  roefer
00954 * Destructor call of PlayersPerceptor added
00955 *
00956 * Revision 1.44  2003/03/12 13:46:04  dasmuli
00957 * PlayersPerceptor added to cognition, modules.cfg, DebugKey-table etc.
00958 *
00959 * Revision 1.43  2003/03/10 13:59:05  juengel
00960 * Added ObstaclesLocator
00961 *
00962 * Revision 1.42  2003/03/05 14:07:10  roefer
00963 * LinesPerceptor2 is now LinesImageProcessor
00964 *
00965 * Revision 1.41  2003/03/05 11:10:05  loetzsch
00966 * added class GlobalGameControlData
00967 *
00968 * Revision 1.40  2003/03/04 15:05:11  juengel
00969 * Added handling for idParametersForGridImageProcessor2
00970 *
00971 * Revision 1.39  2003/02/27 12:02:30  dueffert
00972 * JoystickData added
00973 *
00974 * Revision 1.38  2003/02/21 22:20:13  roefer
00975 * LinesSelfLocator is working
00976 *
00977 * Revision 1.37  2003/02/21 18:32:04  roefer
00978 * pColorTable -> colorTable finished
00979 *
00980 * Revision 1.36  2003/02/19 14:59:55  roefer
00981 * pColorTable -> colorTable
00982 *
00983 * Revision 1.35  2003/02/18 21:29:17  osterhues
00984 * Changed all instances of ColorTable64 to new base class ColorTable
00985 *
00986 * Revision 1.34  2003/02/18 13:24:37  wachter
00987 * added new TeamMessageCollection and TeamMessage
00988 *
00989 * Revision 1.33  2003/02/16 08:29:40  roefer
00990 * sendOdometryData added
00991 *
00992 * Revision 1.32  2003/02/08 18:36:44  juengel
00993 * added idGridImageProcessor2Thresholds
00994 *
00995 * Revision 1.31  2003/02/07 16:43:15  dueffert
00996 * Bombay stuff added after cleanup
00997 *
00998 * Revision 1.30  2003/01/30 22:31:47  juengel
00999 * Added LinesPercept to ImageProcessorInterfaces.
01000 *
01001 * Revision 1.29  2003/01/30 11:28:54  juengel
01002 * Added idGridImageProcessor2Parameters and id LinesPerceptorParameters.
01003 *
01004 * Revision 1.28  2003/01/22 18:09:23  loetzsch
01005 * continued implementation of sending of intermediate code from xabsl2 dialog
01006 * to a xabsl2 behavior control
01007 *
01008 * Revision 1.27  2003/01/21 15:34:36  loetzsch
01009 * idXabslDebugRequest is handled directly by the BehaviorControl
01010 * selector instead of the ModuleHandler
01011 *
01012 * Revision 1.26  2003/01/15 13:46:34  roefer
01013 * SelfLocator has access to CameraMatrix now
01014 *
01015 * Revision 1.25  2003/01/13 18:25:30  juengel
01016 * Added odometry to SensorBehaviorControlInterfaces.
01017 *
01018 * Revision 1.24  2002/12/08 07:11:14  roefer
01019 * Decompress JPEG images in Cognition
01020 *
01021 * Revision 1.23  2002/12/07 16:40:45  roefer
01022 * Blocking for theDebugReceiver changed
01023 *
01024 * Revision 1.22  2002/12/07 12:35:38  loetzsch
01025 * world states and percepts now can be viewed without sending images
01026 *
01027 * Revision 1.21  2002/12/06 16:41:01  goehring
01028 * no message
01029 *
01030 * Revision 1.20  2002/11/28 18:54:53  juengel
01031 * Added SoundRequest to SensorBehaviorControl interfaces.
01032 *
01033 * Revision 1.19  2002/11/28 14:46:51  jhoffman
01034 * added special percept for motion detection
01035 *
01036 * Revision 1.18  2002/11/26 19:22:18  juengel
01037 * added stopwatchID for SensorBehaviorControl
01038 *
01039 * Revision 1.17  2002/11/26 19:19:24  loetzsch
01040 * JPEG images are put into local processes
01041 *
01042 * Revision 1.16  2002/11/20 15:44:49  juengel
01043 * Added cameraMatrix to SensorBehaviorControlInterfaces.
01044 *
01045 * Revision 1.15  2002/11/18 19:24:16  juengel
01046 * Line Follower added.
01047 *
01048 * Revision 1.14  2002/11/18 17:30:31  loetzsch
01049 * Sound requests generated from BehaviorControl are now automatically sent
01050 * to RobotControl and played there.
01051 *
01052 * Revision 1.13  2002/11/07 17:30:10  loetzsch
01053 * renamed Module SensorDataToMotionRequest to SensorBehaviorControl
01054 *
01055 * Revision 1.12  2002/10/11 13:54:44  roefer
01056 * JPEGImage added
01057 *
01058 * Revision 1.11  2002/10/10 13:09:50  loetzsch
01059 * First experiments with the PSD Sensor
01060 * - SensorDataProcessor now calculates PSDPercept
01061 * - Added the PerceptBehaviorControl solution PSDTest
01062 * - Added the RadarViewer3D to RobotControl, which can display the Points3D structure
01063 *
01064 * Revision 1.10  2002/10/04 10:20:47  loetzsch
01065 * renamed bool imageIsNew to processImage,
01066 * images are also processed when a new color table arrives
01067 *
01068 * Revision 1.9  2002/09/25 10:25:13  loetzsch
01069 * removed the "executeVisionModules" variable
01070 * from SolutionRequest and ModuleHandler.
01071 *
01072 * Revision 1.8  2002/09/18 19:52:36  loetzsch
01073 * the head state is now sent from Motion to Cognition using the package.
01074 *
01075 * Revision 1.7  2002/09/18 16:35:12  loetzsch
01076 * made GT2003 compilable,
01077 * rechanged message ids
01078 *
01079 * Revision 1.6  2002/09/17 23:55:22  loetzsch
01080 * - unraveled several datatypes
01081 * - changed the WATCH macro
01082 * - completed the process restructuring
01083 *
01084 * Revision 1.5  2002/09/16 17:34:23  dueffert
01085 * anonymous contructors returns &CLASS with VS, but CLASS with gcc.
01086 *
01087 * Revision 1.4  2002/09/12 14:20:05  juengel
01088 * Created a package for all data sent from Cognition to Motion.
01089 *
01090 * Revision 1.3  2002/09/12 12:40:58  juengel
01091 * continued change of module/solution mechanisms
01092 *
01093 * Revision 1.2  2002/09/10 21:07:30  loetzsch
01094 * continued change of module/solution mechanisms
01095 *
01096 * Revision 1.1  2002/09/10 15:41:25  cvsadm
01097 * Created new project GT2003 (M.L.)
01098 * - Cleaned up the /Src/DataTypes directory
01099 * - Removed challenge related source code
01100 * - Removed processing of incoming audio data
01101 * - Renamed AcousticMessage to SoundRequest
01102 * - Removed all process layouts
01103 * - Added process layout CMD
01104 *
01105 * Revision 1.33  2002/09/07 13:36:58  loetzsch
01106 * unified the vision modules into one module "ImageProcessor"
01107 * - FloodFillRLEImageProcessor, BallPerceptor, LandmarksPerceptor
01108 *   and PlayersPerceptor were are combined to the new solution
01109 *   "BlobImageProcessor"
01110 * - The GridImageProcessor and the SubPixelGradientCalculator became
01111 *   a solution of "ImageProcessor"
01112 *
01113 * Revision 1.32  2002/08/04 19:42:09  roefer
01114 * SimGT2002 receives player config
01115 *
01116 * Revision 1.31  2002/07/29 17:45:11  jhoffman
01117 * added braitenberg vehicle-style behavior (or actually: a "sensor data to motion request")
01118 *
01119 * Revision 1.30  2002/07/23 13:40:51  loetzsch
01120 * - new streaming classes
01121 * - removed many #include statements
01122 * - new design of debugging architecture
01123 * - exchanged StaticQueue with MessageQueue
01124 * - new debug message handling
01125 * - general clean up
01126 *
01127 * Revision 1.29  2002/07/09 20:08:27  roefer
01128 * Extract simulation colors from color table
01129 *
01130 * Revision 1.28  2002/07/09 16:26:48  roefer
01131 * OUTPUT without braces fixed
01132 *
01133 * Revision 1.27  2002/06/28 10:30:51  roefer
01134 * OUTPUT is possible in constructors
01135 *
01136 * Revision 1.26  2002/06/28 10:26:21  roefer
01137 * OUTPUT is possible in constructors
01138 *
01139 * Revision 1.25  2002/06/20 00:40:21  Thomas Röfer
01140 * WLan crash removed
01141 *
01142 * Revision 1.24  2002/06/13 12:15:24  roefer
01143 * sim.c64 is default color table under SimGT2002
01144 *
01145 * Revision 1.23  2002/06/12 11:34:29  roefer
01146 * SimpleLinesPerceptor removed, PerceptBehaviorControl added
01147 *
01148 * Revision 1.22  2002/06/10 11:05:17  risler
01149 * added timestamp to motion request
01150 * motioncontrol executes swing when no request was received
01151 *
01152 * Revision 1.21  2002/06/09 15:24:52  loetzsch
01153 * Added TeamMessageCollection and BehaviorTeamMessage to the execute of BehaviorControl
01154 *
01155 * Revision 1.20  2002/06/08 20:41:15  mkunz
01156 * specialPercept queue completed
01157 *
01158 * Revision 1.19  2002/06/08 11:44:00  mkunz
01159 * Special Percept on Field
01160 *
01161 * Revision 1.18  2002/06/08 09:26:32  Thomas Röfer
01162 * Team ball position, first draft
01163 *
01164 * Revision 1.17  2002/06/07 10:24:16  loetzsch
01165 * added teamCollection to the execute of the players locator
01166 *
01167 * Revision 1.16  2002/06/04 23:27:02  loetzsch
01168 * 4-robots-in-RobotControl related bug fixes and improvements
01169 *
01170 * Revision 1.15  2002/06/04 00:15:36  loetzsch
01171 * RobotControl now can simulate four robots.
01172 *
01173 * Revision 1.14  2002/06/03 15:27:30  roefer
01174 * BallLocator gets TeamMessageCollection
01175 *
01176 * Revision 1.13  2002/06/02 23:21:09  roefer
01177 * Single color table and progress in LinesSelfLocator
01178 *
01179 * Revision 1.12  2002/05/29 15:54:29  cesarz
01180 * Removed deadlock in acoustic communication
01181 *
01182 * Revision 1.11  2002/05/27 15:39:13  fischer
01183 * Added SoundState (Sender and Receiver)
01184 *
01185 * Revision 1.10  2002/05/26 14:55:25  roefer
01186 * Team communication is working
01187 *
01188 * Revision 1.9  2002/05/26 14:22:09  juengel
01189 * SpecialVisionRequest for ImageToPerceptCollection modules.
01190 *
01191 * Revision 1.8  2002/05/23 12:16:37  hebbel
01192 * detects acoustic messages only if dog is not sending himself
01193 *
01194 * Revision 1.7  2002/05/22 13:46:42  fischer
01195 * Changed SoundInProcessor interface to accept WorldState
01196 *
01197 * Revision 1.6  2002/05/21 12:23:12  hebbel
01198 * added startSoundAnalyse() in SoundProtocol
01199 *
01200 * Revision 1.5  2002/05/16 22:36:11  roefer
01201 * Team communication and GTMath bugs fixed
01202 *
01203 * Revision 1.4  2002/05/15 15:47:30  risler
01204 * added debug message AcousticMessage, DebugMessageGenerator generates AcousticMessage
01205 *
01206 * Revision 1.3  2002/05/14 21:04:04  hebbel
01207 * processing of SoundDataIn added
01208 *
01209 * Revision 1.2  2002/05/10 17:29:43  juengel
01210 * Added SpecialVision and SpecialPercept.
01211 *
01212 * Revision 1.1.1.1  2002/05/10 12:40:19  cvsadm
01213 * Moved GT2002 Project from ute to tamara.
01214 *
01215 * Revision 1.66  2002/05/07 15:34:46  jhoffman
01216 * world state is being passed to imagetoperceptcollection. if none is passed, it is set to 0
01217 *
01218 * Revision 1.65  2002/05/05 22:12:43  loetzsch
01219 * GameControlData can now be sent from the Game toolbar to BehaviorControl
01220 *
01221 * Revision 1.64  2002/05/05 18:52:03  loetzsch
01222 * added
01223 * - GameControlData,
01224 * - Receivers for GameControlData
01225 * - access by behavior to GameControlData
01226 *
01227 * Revision 1.63  2002/05/04 12:43:38  loetzsch
01228 * The currently executed MotionRequest is now sent from the MotionControl
01229 * to the BehaviorControl via the OdometryData structure
01230 *
01231 * Revision 1.62  2002/04/29 17:17:51  hebbel
01232 * Put SoundPlay to Motion Process
01233 *
01234 * Revision 1.61  2002/04/28 19:19:46  giese
01235 * SoundPlay added...
01236 *
01237 * Revision 1.60  2002/04/23 00:01:37  roefer
01238 * Redesign of Bremen process layout
01239 *
01240 * Revision 1.59  2002/04/20 15:52:21  roefer
01241 * Project simpified, WATCH and WATCH_PART added
01242 *
01243 * Revision 1.58  2002/04/09 11:19:06  loetzsch
01244 * debug message handling for idPlayerConfig
01245 *
01246 * Revision 1.57  2002/04/08 13:34:13  dueffert
01247 * PlayersToolBar added
01248 *
01249 * Revision 1.56  2002/04/06 09:55:53  roefer
01250 * Image and SensorData path through DebugQueues changed
01251 *
01252 * Revision 1.55  2002/04/02 15:04:46  loetzsch
01253 * debug message handling for Xabsl debug requests added
01254 *
01255 * Revision 1.54  2002/04/02 13:10:21  dueffert
01256 * big change: odometryData and cameraMatrix in image now, old logfiles may be obsolete
01257 *
01258 * Revision 1.53  2002/04/02 10:30:34  juengel
01259 * GridImageProcessor enhanced.
01260 *
01261 * Revision 1.52  2002/03/29 14:53:45  juengel
01262 * ImageToPerceptCollection reactivated.
01263 *
01264 * Revision 1.51  2002/03/28 16:55:58  risler
01265 * RobotStateDetector receives BodyPercept instead of PerceptCollection
01266 * added switch duration in RobotStateDetector
01267 *
01268 * Revision 1.50  2002/03/24 18:15:00  loetzsch
01269 * continued change to blocking sensor data receivers
01270 *
01271 * Revision 1.49  2002/03/24 17:47:02  juengel
01272 * LinesPercept defined and LinesPerceptor added.
01273 *
01274 * Revision 1.48  2002/02/25 16:31:52  loetzsch
01275 * added setting of camera parameters
01276 *
01277 * Revision 1.47  2002/02/24 10:02:21  juengel
01278 * TimeDiagramDlgBar completed.
01279 *
01280 * Revision 1.46  2002/02/21 14:22:47  loetzsch
01281 * added several STOP_WATCH_ON_REQUEST macros
01282 *
01283 * Revision 1.45  2002/02/13 15:07:35  fischer
01284 * copyfiles.bash copies the file "rules.rb" to the stick.
01285 * Minor changes to FuzzyBehaviorControl
01286 *
01287 * Revision 1.44  2002/02/11 00:57:15  loetzsch
01288 * no message
01289 *
01290 * Revision 1.43  2002/02/06 01:15:40  loetzsch
01291 * oracled world states are now first send through the local processes
01292 * before they are painted. (for synchronization with the painting of the
01293 * calculated world states)
01294 *
01295 * Revision 1.42  2002/02/05 20:02:16  risler
01296 * handleDebugMessage now returns bool, added debug message handling to ImageProcessor
01297 *
01298 * Revision 1.41  2002/02/05 04:19:04  loetzsch
01299 * replaced several team color hacks by getPlayer().getTeamColor()
01300 *
01301 * added a few new module selectors
01302 *
01303 * changed distribution of debug messages completely
01304 *
01305 * Revision 1.40  2002/02/04 13:47:09  kspiess
01306 * BremenBerlin2001PlayersLocator in GT2001PlayersLocator umbenannt
01307 * alte Aufrufe in neue geändert
01308 * DebugDrawing für GT2001PlayersLocator eingebaut
01309 *
01310 * Revision 1.39  2002/02/03 20:42:26  juengel
01311 * Ball perception in improved.
01312 *
01313 * Revision 1.38  2002/02/03 16:11:57  juengel
01314 * wordStateOracle drawing added
01315 *
01316 * Revision 1.37  2002/02/03 14:37:59  juengel
01317 * Drawing of the world state removed from Berlin2001BehaviorControl.
01318 * Drawing method for world states added to PaintMethods.
01319 * Drawing of the world state added to the Processes with BehaviorControl.
01320 *
01321 * Revision 1.36  2002/01/31 19:41:24  risler
01322 * ImageProcessorSelector added
01323 *
01324 * Revision 1.35  2002/01/30 17:29:55  loetzsch
01325 * handleDebugMessage um Parameter timestamp erweitert
01326 *
01327 * Revision 1.34  2002/01/30 02:22:57  tim
01328 * BremenBerlin2001PlayersPerceptor und Bremen2002ImageProcessor umbenannt. DefaultPlayersPerceptor hinzugefügt
01329 *
01330 * Revision 1.33  2002/01/28 14:01:33  loetzsch
01331 * useless OUTPUTs removed
01332 *
01333 * Revision 1.32  2002/01/26 18:10:16  juengel
01334 * DebugDrawingManager umstrukturiert.
01335 *
01336 * Revision 1.31  2002/01/25 16:51:45  loetzsch
01337 * #if defined (_WIN32) etc. changed
01338 *
01339 * Revision 1.30  2002/01/25 14:02:52  brunn
01340 * Defines verbessert, kein WIN32 auf dem Roboter
01341 *
01342 * Revision 1.29  2002/01/24 18:17:36  loetzsch
01343 * Added automatic sending of images under Win32 (not SimRobot
01344 *
01345 * Revision 1.28  2002/01/23 13:51:55  loetzsch
01346 * from Debug Queues odometry data is now sent to Motion and not to Perception
01347 *
01348 * Revision 1.27  2002/01/23 12:35:37  juengel
01349 * Repaint von DebugDrawings neu organisiert.
01350 *
01351 * Revision 1.26  2002/01/23 07:50:31  loetzsch
01352 * Dies & das
01353 *
01354 * Revision 1.25  2002/01/23 02:47:39  loetzsch
01355 * mcf tuned
01356 *
01357 * Revision 1.24  2002/01/22 19:49:06  loetzsch
01358 * stopwatch changed
01359 *
01360 * Revision 1.23  2002/01/22 14:56:30  juengel
01361 * ColorTable verschicken angefangen.
01362 *
01363 * Revision 1.22  2002/01/20 23:34:27  loetzsch
01364 * Sending images and sensor data to processes running in RobotControl now possible
01365 *
01366 * Revision 1.21  2002/01/19 12:43:16  risler
01367 * enabled SolutionRequest, changed HandleDebugMessage calls
01368 *
01369 * Revision 1.20  2002/01/19 08:07:29  juengel
01370 * stopwatch weiterentwickelt
01371 *
01372 * Revision 1.19  2002/01/18 23:30:45  loetzsch
01373 * Distribution of HeadControlModes, HeadMotionRequests and SolutionRequests added
01374 *
01375 * Revision 1.18  2002/01/18 14:09:03  risler
01376 * BehaviorControlSelector added
01377 *
01378 * Revision 1.17  2002/01/18 02:17:37  loetzsch
01379 * MotionTester dialog and distribution of MotionRequests
01380 * to the processes programmed.
01381 *
01382 * Revision 1.16  2002/01/06 13:50:29  juengel
01383 * WalkDemo eingebaut
01384 *
01385 * Revision 1.15  2001/12/21 14:09:39  roefer
01386 * Added several destructors
01387 *
01388 * Revision 1.14  2001/12/20 17:14:35  loetzsch
01389 * Using debug requests from the memory stick.
01390 *
01391 * Revision 1.13  2001/12/19 18:37:32  bach
01392 * Camera.cfg added
01393 * Sensors: CameraParameters are set
01394 *
01395 * Revision 1.12  2001/12/19 16:03:55  bach
01396 * SystemDataTypes replaced by Sensors
01397 *
01398 * Revision 1.11  2001/12/16 17:18:54  loetzsch
01399 * DebugKeyToolBar wieder große Member Funktionsnamen eingebaut, Technote zu Toolbars
01400 *
01401 * Revision 1.10  2001/12/15 20:32:09  roefer
01402 * Senders and receivers are now part of the processes
01403 *
01404 * Revision 1.9  2001/12/13 12:57:18  loetzsch
01405 * Aufruf des SensorDataProcesssors entfernt, da dieser abstürzt.
01406 *
01407 * Revision 1.8  2001/12/12 18:08:55  loetzsch
01408 * Streaming- Operatoren für Bilder eingebaut, DebugKeyTable nicht- statisch gemacht, Debuggin Mechanismen weitergemacht, Bilder aus Logfiles in RobotControl anzeigen, Logfiles in HU1/Debug auf den Stick schreiben
01409 *
01410 * Revision 1.7  2001/12/10 17:47:08  risler
01411 * change log added
01412 *
01413 */

Generated on Thu Sep 23 19:57:34 2004 for GT2004 by doxygen 1.3.6