00001 /** 00002 * @file KickLoggerSymbols.h 00003 * 00004 * Declaration of class KickLoggerSymbols 00005 * 00006 * @author Carsten Schumann 00007 */ 00008 00009 #ifndef __KickLoggerSymbols_h_ 00010 #define __KickLoggerSymbols_h_ 00011 00012 #include "../../BehaviorControl.h" 00013 #include "Tools/Xabsl2/Xabsl2Engine/Xabsl2Engine.h" 00014 #include "Tools/Streams/InStreams.h" 00015 #include "Tools/Streams/OutStreams.h" 00016 #include "../GT2005KickLogger/GT2005KickLogger.h" 00017 00018 /** 00019 * The Xabsl2 symbols that are defined in "kick-logger-symbols.xml" 00020 * 00021 * @author Carsten Schumann 00022 */ 00023 class KickLoggerSymbols : public Xabsl2FunctionProvider, public BehaviorControlInterfaces 00024 { 00025 public: 00026 /* 00027 * Constructor. 00028 * @param interfaces The paramters of the BehaviorControl module. 00029 */ 00030 KickLoggerSymbols(BehaviorControlInterfaces& interfaces); 00031 00032 /** registers the symbols at an engine */ 00033 void registerSymbols(Xabsl2Engine& engine); 00034 00035 /** updates the symbols */ 00036 void update(); 00037 private: 00038 GT2005KickLogger kickLogger; 00039 00040 GT2005KickRecord currentRecord; 00041 00042 /* RobotPose robotBefore; 00043 Vector2<double> ballBefore; 00044 Vector3<int> speedWhenExecuted; 00045 double rotationWhenExceuted; 00046 Vector2<int> relativePositionWhenExecuted; 00047 */ 00048 double walktoRotation; 00049 Vector2<double> executeTarget; 00050 Vector2<double> walktoTarget; 00051 bool walktoTargetGenerated; 00052 00053 Vector2<int> getBallPosition(); 00054 00055 00056 Vector2<double> lastCeilCamBallPosition; 00057 long lastCeilCamBallPositionTime; 00058 00059 bool kickLoggerSave(); 00060 bool kickLoggerSetBeforeState(); 00061 bool kickLoggerSetExecuteState(); 00062 bool kickLoggerSetAfterStateAndCommit(); 00063 double getWalktoTargetX(); 00064 double getWalktoTargetY(); 00065 double getWalktoTargetR(); 00066 void generateWalktoTarget(); 00067 bool doExecute(); 00068 bool isNear(); 00069 double getTriggerX(); 00070 bool ballHasStopped(); 00071 double getKick(); 00072 double getPropagatedRelativeX(); 00073 bool ballOutsideArea(); 00074 00075 //Used to determine that the ceiling camera is not sending data any more 00076 Vector2<double> lastCeilCamData; 00077 int lastCeilCamDataCount; 00078 bool ceilCamActive(); 00079 int executeCounter; 00080 00081 }; 00082 00083 #endif // __KickLoggerSymbols_h_
1.3.6