00001 #ifndef __GT2005StableSelfLocatorSample_h_
00002 #define __GT2005StableSelfLocatorSample_h_
00003
00004
00005 #include "Representations/Cognition/SampleSet.h"
00006 #include "Representations/Perception/LinesPercept.h"
00007 #include "Tools/Math/Pose2D.h"
00008 #include "Tools/Debugging/Debugging.h"
00009 #include "Platform/SystemCall.h"
00010
00011
00012
00013
00014
00015
00016 class GT2005StableSelfLocatorSample : public PoseSample
00017 {
00018 public:
00019
00020 enum{
00021 UNINITIALIZED_PROBABILITY = 2,
00022 NO_PERCEPT_PROBABILITY = 3,
00023 PERCEPT_TTL_MS = 2000
00024 };
00025
00026 static double paramProbUpLimit,
00027 paramProbDownLimit,
00028 paramProbDelay;
00029
00030
00031
00032 enum PerceptType
00033 {
00034 xFieldLine,
00035 yFieldLine,
00036 border,
00037 flag,
00038 yellowGoal,
00039 skyblueGoal,
00040 lineCrossing,
00041 numberOfPerceptTypes
00042 };
00043
00044 Pose2D camera;
00045 double perceptProbabilities[numberOfPerceptTypes];
00046 long perceptTimestamps[numberOfPerceptTypes];
00047 GT2005StableSelfLocatorSample* next;
00048
00049
00050
00051
00052 GT2005StableSelfLocatorSample();
00053
00054
00055
00056
00057
00058 GT2005StableSelfLocatorSample(const Pose2D& pose);
00059
00060 double getProbability() const {return probability;}
00061
00062
00063
00064
00065 void updateProbability();
00066
00067
00068
00069
00070
00071
00072 void updateProbability(const double* average);
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 void setPerceptProbability(GT2005StableSelfLocatorSample::PerceptType type,double value);
00083
00084 bool isValid() const {return probability <= 1;}
00085 };
00086 #endif
00087
00088
00089