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

Modules/BehaviorControl/GT2004BehaviorControl/GT2004BehaviorControl.cpp

Go to the documentation of this file.
00001 /**
00002 * @file GT2004BehaviorControl.cpp
00003 * 
00004 * Implementation of class GT2004BehaviorControl.
00005 *
00006 * @author Martin Lötzsch
00007 * @author Matthias Jüngel
00008 */
00009 
00010 #include "GT2004BehaviorControl.h"
00011 #include "Tools/Player.h"
00012 
00013 GT2004BehaviorControl::GT2004BehaviorControl(BehaviorControlInterfaces& interfaces)
00014 : Xabsl2BehaviorControl(interfaces,SolutionRequest::gt2004),
00015 calibrationSymbols(interfaces),
00016 angleSymbols(interfaces),
00017 ballSymbols(interfaces),
00018 configurationSymbols(interfaces),
00019 headAndTailSymbols(interfaces),
00020 joystickSymbols(interfaces),
00021 kickSelectionSymbols(interfaces,"GT2004.kst"),
00022 ledAndSoundSymbols(interfaces),
00023 mathFunctions(interfaces),
00024 motionRequestSymbols(interfaces),
00025 obstaclesSymbols(interfaces),
00026 roboCupGameManagerSymbols(interfaces),
00027 robotPoseSymbols(interfaces),
00028 robotStateSymbols(interfaces),
00029 specialVisionSymbols(interfaces),
00030 strategySymbols(interfaces),
00031 evolutionSymbols(interfaces, gt2004ParametersSet, gt2004ParametersCalibration, gt2004CurrentIndex, measurementRequest, evolutionMode),
00032 openchallengeSymbols(interfaces),
00033 challengeSymbols(interfaces),
00034 dttSymbols(interfaces,&actualTacticChooser),
00035 simpleBasicBehaviors(interfaces,errorHandler),
00036 evolutionBasicBehaviors(interfaces,errorHandler, gt2004ParametersSet, gt2004ExtraParameters, gt2004ParametersCalibration, gt2004CurrentIndex, measurementRequest, evolutionMode),
00037 potentialFieldBasicBehaviors(interfaces,errorHandler),
00038 commonBasicBehaviors(interfaces,errorHandler),
00039 kickLogger(interfaces),
00040 gt2004CurrentIndex((int)GT2004ParametersSet::no_turn_0_fast),
00041 evolutionMode(1),
00042 collectedBeliefs(interfaces)
00043 {
00044   Xabsl2FileInputSource file("Xabsl2/gt04-ic.dat");
00045   init(file);
00046   ASSERT(pEngine);
00047 
00048   measurementRequest = gt2004ParametersSet.getParameters(gt2004CurrentIndex)->requestedMotion;
00049   for (int i=0;i<=127;i++)
00050   {
00051     gt2004ParametersCalibration[i]=Pose2D(0,0,0);
00052   }
00053   gt2004ExtraParameters.index=GT2004ParametersSet::numberOfParameters;
00054   quickStop = false;
00055 
00056   // DynamicTeamTactic Section
00057   chooserRaterInterfaces.lastChoosenOption = RateableOptions::noOption;
00058 
00059   // DefaultOptionRating Engine..
00060   optionRating[RateableOptions::defaultOptionRating] =
00061     new DefaultOptionRating(interfaces,collectedBeliefs,chooserRaterInterfaces);
00062 
00063   // set default engine as actual engine 
00064   actualOptionRating = optionRating[RateableOptions::defaultOptionRating];
00065 
00066 
00067   // DefaultTacticChooser Engine..
00068   tacticChooser[RateableOptions::defaultTacticChooser] =
00069     new DefaultTacticChooser(interfaces,collectedBeliefs,chooserRaterInterfaces);
00070 
00071   // set default engine as actual engine 
00072   actualTacticChooser = tacticChooser[RateableOptions::defaultTacticChooser];
00073 
00074 
00075 }
00076 
00077 GT2004BehaviorControl::~GT2004BehaviorControl()
00078 {
00079   delete(optionRating[RateableOptions::defaultOptionRating]);
00080   optionRating[RateableOptions::defaultOptionRating] = NULL;
00081   delete(tacticChooser[RateableOptions::defaultTacticChooser]);
00082   tacticChooser[RateableOptions::defaultTacticChooser] = NULL;
00083   actualTacticChooser = NULL;
00084 }
00085 
00086 void GT2004BehaviorControl::registerSymbolsAndBasicBehaviors()
00087 {
00088   simpleBasicBehaviors.registerBasicBehaviors(*pEngine);
00089   evolutionBasicBehaviors.registerBasicBehaviors(*pEngine);
00090   potentialFieldBasicBehaviors.registerBasicBehaviors(*pEngine);
00091   commonBasicBehaviors.registerBasicBehaviors(*pEngine);
00092   calibrationSymbols.registerSymbols(*pEngine);
00093   angleSymbols.registerSymbols(*pEngine);
00094   ballSymbols.registerSymbols(*pEngine);
00095   configurationSymbols.registerSymbols(*pEngine);
00096   headAndTailSymbols.registerSymbols(*pEngine);
00097   joystickSymbols.registerSymbols(*pEngine);
00098   ledAndSoundSymbols.registerSymbols(*pEngine);
00099   kickSelectionSymbols.registerSymbols(*pEngine);
00100   mathFunctions.registerSymbols(*pEngine);
00101   motionRequestSymbols.registerSymbols(*pEngine);
00102   obstaclesSymbols.registerSymbols(*pEngine);
00103   roboCupGameManagerSymbols.registerSymbols(*pEngine);
00104   robotPoseSymbols.registerSymbols(*pEngine);
00105   robotStateSymbols.registerSymbols(*pEngine);
00106   specialVisionSymbols.registerSymbols(*pEngine);
00107   strategySymbols.registerSymbols(*pEngine);
00108   evolutionSymbols.registerSymbols(*pEngine);
00109   openchallengeSymbols.registerSymbols(*pEngine);
00110   challengeSymbols.registerSymbols(*pEngine);
00111   dttSymbols.registerSymbols(*pEngine);
00112 }
00113 
00114 void GT2004BehaviorControl::preExecute()
00115 {
00116   for(int i = 0; i < 14; i++) ledRequest.faceLED[i] = LEDRequest::oooo;
00117   ledRequest.backFrontWhiteLED = LEDRequest::oooo;
00118   ledRequest.backMiddleWhiteLED = LEDRequest::oooo;
00119   ledRequest.backRearWhiteLED = LEDRequest::oooo;
00120   ledRequest.backMiddleOrangeLED = LEDRequest::oooo;
00121 
00122   ledRequest.headWhiteLED = LEDRequest::oooo;
00123   ledRequest.headOrangeLED = LEDRequest::oooo;
00124 
00125   // set the outgoing behavior team message to none
00126   outgoingBehaviorTeamMessage.message = BehaviorTeamMessage::none;
00127   
00128   // Set the tail request depending on whether the ball was seen
00129   if (ballModel.ballWasSeen)
00130   {
00131     // ball seen
00132     ledRequest.headWhiteLED = LEDRequest::llll;
00133     motionRequest.tailRequest.tailRequestID = TailRequest::noTailWag;
00134   }
00135   else if (SystemCall::getTimeSince(ballModel.seen.timeWhenLastSeen) 
00136     > BallModel::behaviorControlTimeAfterWhichCommunicatedBallsAreAccepted
00137     && SystemCall::getTimeSince(ballModel.communicated.timeWhenLastObserved) < 3000)
00138   {
00139     // ball known
00140     motionRequest.tailRequest.tailRequestID = TailRequest::wagHorizontalFast;
00141   }
00142   else
00143   {
00144     // ball not known
00145     motionRequest.tailRequest.tailRequestID = TailRequest::noTailWag;
00146   }
00147   
00148   // set head control mode lookToStars to detect missing settings
00149   headControlMode.headControlMode = HeadControlMode::lookToStars;
00150 
00151   soundRequest.soundID = SoundRequest::none;
00152 
00153   angleSymbols.angleShownByLEDs = AngleSymbols::undefined;
00154 
00155   // DynamicTeamTactic Section
00156   // Update the collectedBeliefs
00157   collectedBeliefs.update();
00158 
00159   // Rate your Options with actual ratingEngine
00160   actualOptionRating->rateOptions();
00161 
00162   // Update the DynamicTeamTactic Symbols
00163   dttSymbols.update();
00164 
00165   if ((dttSymbols.actualOption == RateableOptions::gotoBitePos1)
00166     ||(dttSymbols.actualOption == RateableOptions::bitePos1)
00167     ||(dttSymbols.actualOption == RateableOptions::movePos1)
00168     )
00169     ledRequest.faceLED[1] = LEDRequest::llll;
00170   if ((dttSymbols.actualOption == RateableOptions::gotoBitePos2)
00171     ||(dttSymbols.actualOption == RateableOptions::bitePos2)
00172     ||(dttSymbols.actualOption == RateableOptions::movePos2)
00173     )
00174     ledRequest.faceLED[0] = LEDRequest::llll;
00175   if ((dttSymbols.actualOption == RateableOptions::gotoBitePos3)
00176     ||(dttSymbols.actualOption == RateableOptions::bitePos3)
00177     ||(dttSymbols.actualOption == RateableOptions::movePos3)
00178     )
00179     ledRequest.faceLED[3] = LEDRequest::llll;
00180   if ((dttSymbols.actualOption == RateableOptions::gotoBitePos4)
00181     ||(dttSymbols.actualOption == RateableOptions::bitePos4)
00182     ||(dttSymbols.actualOption == RateableOptions::movePos4)
00183     )
00184     ledRequest.faceLED[2] = LEDRequest::llll;
00185 
00186 /* @jörn: this can be commented in, when merging of openChallenge Symbols is done
00187   for(int j=0; j<Player::numOfPlayerNumbers; ++j)
00188   {
00189     RateableOptions::OptionID option = ((DefaultTacticChooser*)actualTacticChooser)->ocplayerrole[j];
00190   if ((option == RateableOptions::gotoBitePos1)
00191     ||(option == RateableOptions::bitePos1)
00192     ||(option == RateableOptions::movePos1)
00193     )
00194     openChallengeSymbols.bitePointToUse[j] = BitePoint::frontleft;
00195   if ((option == RateableOptions::gotoBitePos2)
00196     ||(option == RateableOptions::bitePos2)
00197     ||(option == RateableOptions::movePos2)
00198     )
00199     openChallengeSymbols.bitePointToUse[j] = BitePoint::frontright;
00200   if ((option == RateableOptions::gotoBitePos3)
00201     ||(option == RateableOptions::bitePos3)
00202     ||(option == RateableOptions::movePos3)
00203     )
00204     openChallengeSymbols.bitePointToUse[j] = BitePoint::behindleft;
00205   if ((option == RateableOptions::gotoBitePos4)
00206     ||(option == RateableOptions::bitePos4)
00207     ||(option == RateableOptions::movePos4)
00208     )
00209     openChallengeSymbols.bitePointToUse[j] = BitePoint::behindright;
00210   if ((option == RateableOptions::gotoBridge)
00211     ||(option == RateableOptions::climbBridge)
00212     ||(option == RateableOptions::moveBridge)
00213     )
00214     {
00215       openChallengeSymbols.bitePointToUse[j] = BitePoint::master;
00216       openChallengeSymbols.masterDog = j;
00217     }
00218   }
00219 */
00220   // broadcast your option-rating
00221   collectedBeliefs.broadcast();
00222 
00223   // trigger the singleBeliefs
00224   collectedBeliefs.trigger();
00225 }
00226 
00227 void GT2004BehaviorControl::execute()
00228 {
00229   angleSymbols.update();
00230   ballSymbols.update();
00231   configurationSymbols.update();
00232   obstaclesSymbols.update();
00233   roboCupGameManagerSymbols.update();
00234   robotPoseSymbols.update();
00235   strategySymbols.update();
00236   evolutionSymbols.update();
00237   openchallengeSymbols.update();
00238   
00239   potentialFieldBasicBehaviors.update();
00240  
00241   // set some leds and and other variables
00242   preExecute();
00243 
00244   // execute the engine
00245   executeEngine();
00246 
00247   // play some sounds if necessary
00248   postExecute();
00249 
00250   // execute the kick logger, but not during a game
00251   kickLogger.execute();
00252 }
00253 
00254 void GT2004BehaviorControl::postExecute()
00255 {
00256   // handle fall down
00257   if(outgoingBehaviorTeamMessage.gameState != BehaviorTeamMessage::penalized &&
00258      ((robotState.getState() == RobotState::crashed)||
00259      (robotState.getState() == RobotState::rollLeft)||
00260      (robotState.getState() == RobotState::rollRight)))
00261   {
00262     if ((motionInfo.executedMotionRequest.motionType == MotionRequest::walk &&
00263          motionInfo.executedMotionRequest.walkRequest.walkType != WalkRequest::upsideDown)||
00264         (motionInfo.executedMotionRequest.motionType == MotionRequest::stand))
00265     {
00266       motionRequest.motionType = MotionRequest::getup;
00267     }
00268   }
00269 
00270   // display team color
00271   if (getPlayer().getTeamColor() == Player::blue)
00272   {
00273     ledRequest.backFrontBlueLED = LEDRequest::llll;
00274     if(
00275       outgoingBehaviorTeamMessage.gameState == BehaviorTeamMessage::sleep ||
00276       outgoingBehaviorTeamMessage.gameState == BehaviorTeamMessage::initial ||
00277       outgoingBehaviorTeamMessage.gameState == BehaviorTeamMessage::ready ||
00278       outgoingBehaviorTeamMessage.gameState == BehaviorTeamMessage::set)
00279     {
00280       ledRequest.backFrontWhiteLED = LEDRequest::oooo;
00281     }
00282     ledRequest.backRearRedLED = LEDRequest::oooo;
00283   } 
00284   else if (getPlayer().getTeamColor() == Player::red) 
00285   {
00286     ledRequest.backFrontBlueLED = LEDRequest::oooo;
00287     ledRequest.backRearRedLED = LEDRequest::llll;
00288     if(
00289       outgoingBehaviorTeamMessage.gameState == BehaviorTeamMessage::sleep ||
00290       outgoingBehaviorTeamMessage.gameState == BehaviorTeamMessage::initial ||
00291       outgoingBehaviorTeamMessage.gameState == BehaviorTeamMessage::ready ||
00292       outgoingBehaviorTeamMessage.gameState == BehaviorTeamMessage::set)
00293     {
00294       ledRequest.backRearWhiteLED = LEDRequest::oooo;
00295     }
00296   } 
00297   else 
00298   {
00299     ledRequest.backFrontBlueLED = LEDRequest::lloo;
00300     ledRequest.backRearRedLED = LEDRequest::lloo;
00301   }
00302 
00303   if(
00304     outgoingBehaviorTeamMessage.gameState != BehaviorTeamMessage::sleep &&
00305     outgoingBehaviorTeamMessage.gameState != BehaviorTeamMessage::initial)
00306   {
00307     // set the purple face leds depending on the dynamic role.
00308     switch (strategySymbols.role)
00309     {
00310     case BehaviorTeamMessage::striker:
00311       ledRequest.faceLED[13] = LEDRequest::llll;
00312       break;
00313     case BehaviorTeamMessage::offensiveSupporter:
00314       ledRequest.faceLED[13] = LEDRequest::oooo;
00315       ledRequest.faceLED[12] = LEDRequest::lloo;
00316       break;
00317     case BehaviorTeamMessage::defensiveSupporter:
00318       ledRequest.faceLED[13] = LEDRequest::oooo;
00319       break;
00320     default:
00321       ledRequest.faceLED[13] = LEDRequest::oooo;
00322     }
00323 
00324     if(getPlayer().getPlayerNumber() == Player::one)
00325     {
00326       if (ballModel.ballState.ballRollsByLeft)
00327         ledRequest.faceLED[1] = LEDRequest::llll; 
00328       if (ballModel.ballState.ballRollsByRight)
00329         ledRequest.faceLED[0] = LEDRequest::llll; 
00330       if (ballModel.ballState.ballRollsFast)
00331       {
00332         ledRequest.faceLED[2] = LEDRequest::llll; 
00333         ledRequest.faceLED[3] = LEDRequest::llll; 
00334       }
00335       if (ballModel.ballState.ballRollsTowardsRobot)
00336       {
00337         ledRequest.faceLED[1] = LEDRequest::llll; 
00338         ledRequest.faceLED[0] = LEDRequest::llll; 
00339       }
00340     }
00341 
00342     if(angleSymbols.angleShownByLEDs == AngleSymbols::undefined)
00343     {
00344       ledRequest.faceLED[10] = LEDRequest::lolo;
00345     }
00346     else
00347     {
00348       // visualize the angle the robot wants to play to with the top white leds.
00349       double bestAngle;
00350       bestAngle = toDegrees(normalize(angleSymbols.getAngle(angleSymbols.angleShownByLEDs)));
00351 
00352       if     (bestAngle >  75) ledRequest.faceLED[ 7] = LEDRequest::lolo; //?_____   
00353       else if(bestAngle >  45) ledRequest.faceLED[ 7] = LEDRequest::llll; // x____
00354       else if(bestAngle >  15) ledRequest.faceLED[ 9] = LEDRequest::llll; // _x___      
00355       else if(bestAngle > -15) ledRequest.faceLED[10] = LEDRequest::llll; // __x__
00356       else if(bestAngle > -45) ledRequest.faceLED[ 8] = LEDRequest::llll; // ___x_
00357       else if(bestAngle > -75) ledRequest.faceLED[ 6] = LEDRequest::llll; // ____x
00358       else                     ledRequest.faceLED[ 6] = LEDRequest::lolo; // _____?
00359     }
00360 
00361     // display stuck/obstacles
00362     if (obstaclesSymbols.robotIsStuck)
00363     {
00364       ledRequest.faceLED[4] = LEDRequest::llll;
00365       ledRequest.faceLED[5] = LEDRequest::llll;
00366     }
00367     else if (obstaclesSymbols.obstaclesAreClose)
00368     {
00369       ledRequest.faceLED[11] = LEDRequest::llll;
00370     }
00371   }
00372 
00373   // if the head control mode was not set, play a warning sound
00374   if (headControlMode.headControlMode == HeadControlMode::lookToStars)
00375   {
00376     soundRequest.soundID = SoundRequest::rob101;
00377   }
00378 
00379   if(sensorDataBuffer.frame[0].data[SensorData::chin] == 1)
00380     soundRequest.soundID = SoundRequest::bark2;
00381 
00382 
00383   if(sensorDataBuffer.lastFrame().data[SensorData::chin] == 1)
00384   {
00385     if(
00386       robotState.getButtonPressed(BodyPercept::backBack) &&
00387       robotState.getButtonDuration(BodyPercept::backBack) > 1000 &&
00388       profiler.profilerCollectMode == GTXabsl2Profiler::collectProfiles
00389       )
00390     {
00391       profiler.profilerCollectMode = GTXabsl2Profiler::dontCollectProfiles;
00392       profiler.profilerWriteMode = GTXabsl2Profiler::writeCompleteProfiles;
00393       soundRequest.soundID = SoundRequest::bing01;
00394     }
00395 
00396     if(
00397       robotState.getButtonPressed(BodyPercept::backFront) &&
00398       robotState.getButtonDuration(BodyPercept::backFront) > 1000
00399       )
00400     {
00401       profiler.profilerCollectMode = GTXabsl2Profiler::collectProfiles;
00402       soundRequest.soundID = SoundRequest::bing03;
00403     }
00404   }
00405 
00406   if(!quickStop)
00407   {
00408     if(
00409       robotState.getButtonPressed(BodyPercept::chin) &&
00410       robotState.getButtonDuration(BodyPercept::chin) > 500 &&
00411       
00412       robotState.getButtonPressed(BodyPercept::backMiddle) &&
00413       robotState.getButtonDuration(BodyPercept::backMiddle) > 500
00414       )
00415       quickStop = true;
00416   }
00417   else
00418   {
00419     if(
00420       robotState.getButtonPressed(BodyPercept::head) &&
00421       robotState.getButtonDuration(BodyPercept::head) > 100 &&
00422       robotState.getButtonDuration(BodyPercept::head) < 700
00423       )
00424       quickStop = false;
00425   }
00426 
00427   if(quickStop)
00428   {
00429     if(robotState.getButtonPressed(BodyPercept::backFront)) debugHeadControlMode.headControlMode = HeadControlMode::none;
00430     if(robotState.getButtonPressed(BodyPercept::backMiddle)) debugHeadControlMode.headControlMode = HeadControlMode::searchForBall;
00431     if(robotState.getButtonPressed(BodyPercept::backBack)) debugHeadControlMode.headControlMode = HeadControlMode::stayAsForced;
00432 
00433     if(debugHeadControlMode.headControlMode != HeadControlMode::none)
00434     {
00435       headControlMode = debugHeadControlMode;
00436     }
00437 
00438     motionRequest.motionType = MotionRequest::stand;
00439     ledRequest.backFrontWhiteLED = LEDRequest::oooo;
00440     ledRequest.backMiddleWhiteLED = LEDRequest::oooo;
00441     ledRequest.backRearWhiteLED = LEDRequest::oooo;
00442 
00443     ledRequest.backFrontBlueLED = LEDRequest::llll;
00444     ledRequest.backMiddleOrangeLED = LEDRequest::llll;
00445     ledRequest.backRearRedLED = LEDRequest::llll;
00446 
00447     if(debugHeadControlMode.headControlMode == HeadControlMode::none) ledRequest.backFrontWhiteLED = LEDRequest::llll;
00448     if(debugHeadControlMode.headControlMode == HeadControlMode::searchForBall) ledRequest.backMiddleWhiteLED = LEDRequest::llll;
00449     if(debugHeadControlMode.headControlMode == HeadControlMode::stayAsForced) ledRequest.backRearWhiteLED = LEDRequest::llll;
00450   }
00451 }
00452 
00453 bool GT2004BehaviorControl::handleMessage(InMessage& message)
00454 {
00455   switch (message.getMessageID())
00456   {
00457   case idGT2004EvolutionRequest:
00458     {
00459       int mode;
00460       message.bin >> mode;
00461       switch (mode)
00462       {
00463       case 1: // measure GT2004Parameters #... or its mirror if that has higher index or a self choosen motionRequest
00464         {
00465           message.bin >> gt2004CurrentIndex;
00466           message.bin >> evolutionMode;
00467           if (gt2004CurrentIndex==(int)GT2004ParametersSet::numberOfParameters)
00468           {
00469             message.bin >> measurementRequest;
00470             if (GT2004ParametersSet::getSpeed(measurementRequest)<0.05)
00471             {
00472               GT2004ParametersSet::setSpeed(measurementRequest,0.05);
00473             }
00474             gt2004ExtraParameters.requestedMotion=measurementRequest;
00475             OUTPUT(idText,text,"GT2003BehavContr: GT2004EvolutionRequest 'measure (" << measurementRequest.translation.x << ", " << measurementRequest.translation.y << ", " << measurementRequest.rotation << ")' received");
00476           }
00477           else
00478           {
00479             int mirror=GT2004ParametersSet::getIndexOfMirror(gt2004CurrentIndex);
00480             //use higher mirror number = lturn
00481             if ((mirror>=0)&&(mirror>gt2004CurrentIndex))
00482             {
00483               gt2004CurrentIndex=mirror;
00484             }
00485             measurementRequest=gt2004ParametersSet.getParameters(gt2004CurrentIndex)->requestedMotion;
00486             OUTPUT(idText,text,"GT2003BehavContr: GT2004EvolutionRequest 'measure " << GT2004ParametersSet::getIndexString(gt2004CurrentIndex) << "' received (" << measurementRequest.translation.x << ", " << measurementRequest.translation.y << ", " << measurementRequest.rotation << ")");
00487           }
00488           break;
00489         }
00490       case 2: // save parametersSet
00491         gt2004ParametersSet.save();
00492         OUTPUT(idText,text,"GT2003BehavContr: GT2004EvolutionRequest 'save parametersSet' executed");
00493         break;
00494       case 3: // load parametersSet
00495         {
00496           gt2004ParametersSet.load();
00497           for (int i=0;i<(int)GT2004ParametersSet::numberOfParameters;i++)
00498           {
00499             gt2004ParametersCalibration[i]=Pose2D(0,0,0);
00500           }
00501           OUTPUT(idText,text,"GT2003BehavContr: GT2004EvolutionRequest 'load parametersSet' executed and calibration resetted");
00502           break;
00503         }
00504       default:
00505         OUTPUT(idText,text,"GT2003BehavContr: unknown GT2004EvolutionRequest received");
00506         break;
00507       }
00508       return true;
00509     }
00510   case idGT2004Parameters:
00511     {
00512       GT2004Parameters param;
00513       message.bin >> param;
00514       if (param.index<GT2004ParametersSet::numberOfParameters)
00515       {
00516         *gt2004ParametersSet.getParameters(param.index) = param;
00517         OUTPUT(idText,text,"GT2003BehavContr: GT2004Parameters " << GT2004ParametersSet::getIndexString(param.index) << " received (" << param.requestedMotion.translation.x << ", " << param.requestedMotion.translation.y << ", " << param.requestedMotion.rotation << ")");
00518       }
00519       else
00520       {
00521         gt2004ExtraParameters = param;
00522         OUTPUT(idText,text,"GT2003BehavContr: extra GT2004Parameters received (" << param.requestedMotion.translation.x << ", " << param.requestedMotion.translation.y << ", " << param.requestedMotion.rotation << ")");
00523       }
00524       gt2004ParametersCalibration[param.index]=Pose2D(0,0,0);
00525       //and send it to Motion immediately:
00526       gt2004Parameters = param;
00527       walkParameterTimeStamp = SystemCall::getCurrentSystemTime();
00528       return true;
00529     }
00530   default:
00531     
00532     return 
00533       (Xabsl2BehaviorControl::handleMessage(message) ||
00534        kickSelectionSymbols.handleMessage(message) ||
00535        actualTacticChooser->handleMessage(message) 
00536       );
00537   }
00538 }
00539 
00540 
00541 /*
00542 * Change log :
00543 * 
00544 * $Log: GT2004BehaviorControl.cpp,v $
00545 * Revision 1.30  2004/07/22 22:38:17  kerdels
00546 * added DTT used by Open Challenge, RIP and Xabsl-Options will follow
00547 *
00548 * Revision 1.29  2004/07/14 20:34:17  spranger
00549 * removed continous-basic-behaviors
00550 *
00551 * Revision 1.28  2004/07/10 00:13:59  spranger
00552 * renaming for coderelease and preparations for gt2005
00553 *
00554 * Revision 1.27  2004/07/01 13:06:43  risler
00555 * check executedMotionRequest instead of MotionRequest for getup
00556 *
00557 * Revision 1.26  2004/06/29 16:28:39  risler
00558 * removed sleep state
00559 * display robot number in initial
00560 *
00561 * Revision 1.25  2004/06/24 11:25:45  juengel
00562 * Changed LEDs.
00563 *
00564 * Revision 1.24  2004/06/23 19:31:42  juengel
00565 * Angle "undefined" is shown with a blinking middle led.
00566 *
00567 * Revision 1.23  2004/06/22 18:48:56  juengel
00568 * kickAngles clean up
00569 *
00570 * Revision 1.22  2004/06/20 12:02:05  juengel
00571 * Increased time needed to release a quick-stop.
00572 *
00573 * Revision 1.21  2004/06/20 10:40:46  juengel
00574 * Quick stop + back button -> hcm stay as forced.
00575 *
00576 * Revision 1.20  2004/06/17 11:13:03  risler
00577 * removed annoying debug sound
00578 *
00579 * Revision 1.19  2004/06/16 14:43:51  risler
00580 * added obstacles symbols
00581 * added symbol obstacles.opponent-close-to-ball
00582 *
00583 * Revision 1.18  2004/06/15 16:18:21  risler
00584 * dont disable leds quickstop etc while getup
00585 *
00586 * Revision 1.17  2004/06/14 21:40:15  risler
00587 * improved led settings
00588 *
00589 * Revision 1.16  2004/06/14 17:53:25  risler
00590 * gamestate led display unified
00591 *
00592 * Revision 1.15  2004/06/09 08:19:48  dueffert
00593 * missing initializations added
00594 *
00595 * Revision 1.14  2004/06/08 18:36:12  juengel
00596 * Added  "debugHeadControlMode".
00597 *
00598 * Revision 1.13  2004/06/02 17:18:23  spranger
00599 * MotionRequest cleanup
00600 *
00601 * Revision 1.12  2004/06/02 10:56:25  juengel
00602 * quickStop added
00603 *
00604 * Revision 1.11  2004/05/29 18:18:19  dueffert
00605 * walk parameter evolution, measurement and calibration stuff ported to GT2004_WM
00606 *
00607 * Revision 1.10  2004/05/27 18:49:17  kerdels
00608 * added a small 5 frames sliding average for the relative ballspeed,
00609 * added new ballState Representation and adjusted the apropriate files
00610 *
00611 * Revision 1.9  2004/05/27 16:48:08  loetzsch
00612 * added the kick logger
00613 *
00614 * Revision 1.8  2004/05/27 15:48:09  juengel
00615 * Added profiler hot keys.
00616 *
00617 * Revision 1.7  2004/05/27 14:36:49  loetzsch
00618 * readded message handling for kick selection table
00619 *
00620 * Revision 1.6  2004/05/25 12:58:17  tim
00621 * added missing potential field files and example behavior
00622 *
00623 * Revision 1.5  2004/05/24 16:35:20  spranger
00624 * removed doProfiling
00625 *
00626 * Revision 1.4  2004/05/22 21:48:42  loetzsch
00627 * renamed ATHERS7.kst to GT2004.kst
00628 *
00629 * Revision 1.3  2004/05/22 21:31:04  loetzsch
00630 * adopted kick selection table to GT2004
00631 *
00632 * Revision 1.2  2004/05/22 20:45:17  juengel
00633 * Renamed ballP_osition to ballModel.
00634 *
00635 * Revision 1.1.1.1  2004/05/22 17:17:59  cvsadm
00636 * created new repository GT2004_WM
00637 *
00638 * Revision 1.4  2004/05/14 11:37:08  loetzsch
00639 * support for multiple xabsl2engines in different modules
00640 * preliminary GT2004HeadControl (does not work at all)
00641 *
00642 * Revision 1.3  2004/05/08 16:18:13  hamerla
00643 * Open Challenge
00644 *
00645 * Revision 1.2  2004/05/04 10:48:58  loetzsch
00646 * replaced all enums
00647 * xxxBehaviorControlTimeAfterWhichCommunicatedBallsAreAccepted
00648 * by
00649 * behaviorControlTimeAfterWhichCommunicatedBallsAreAccepted
00650 * (this mechanism was neither fully implemented nor used)
00651 *
00652 * Revision 1.1  2004/05/02 13:26:42  juengel
00653 * Added GT2004BehaviorControl.
00654 *
00655 */
00656 

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