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

# Modules/SelfLocator/SlamSelfLocator/SlamLineCrossingsTable.h

Go to the documentation of this file.

    00001 #ifndef SlamLineCrossingsTable_h
    00002 #define SlamLineCrossingsTable_h
    00003
    00004
    00005 #include "Tools/Boundary.h"
    00006 #include "Tools/FieldDimensions.h"
    00007 #include "Tools/Debugging/DebugDrawings.h"
    00008 #include "Tools/Math/Pose2D.h"
    00009
    00010
    00011 class SlamLineCrossingsTable
    00012 {
    00013 public:
    00014   enum CrossingType{
    00015     lineCrossing,
    00016     middleCircle
    00017   };
    00018
    00019   enum CrossingClass{
    00020     unknownCrossing,
    00021     virtualCrossing,
    00022     lCrossing,
    00023     tCrossing,
    00024     falseCrossing
    00025   };
    00026
    00027   static int NO_POINT_DISTANCE;
    00028
    00029   SlamLineCrossingsTable();
    00030   Vector2<double> getClosestPoint(const Vector2<double>& point, CrossingType type);
    00031   Vector2<double> getClassifiedClosestPoint(const Vector2<double>& point, CrossingClass crossingClass);
    00032
    00033
    00034   enum{
    00035     NUMBER_OF_CROSSINGS = 20,
    00036     NUMBER_OF_CLASSIFIED_CROSSINGS = 18,
    00037     NUMBER_OF_VIRTUAL_CROSSINGS = 4,
    00038     NUMBER_OF_T_CROSSINGS = 6,
    00039     NUMBER_OF_L_CROSSINGS = 8,
    00040     NUMBER_OF_FALSE_CROSSINGS = 2
    00041   };
    00042
    00043   static double crossingsX[NUMBER_OF_CROSSINGS];
    00044   static double crossingsY[NUMBER_OF_CROSSINGS];
    00045
    00046   Vector2<double> allCrossings[NUMBER_OF_CLASSIFIED_CROSSINGS];
    00047   Vector2<double> virtualCrossings[NUMBER_OF_VIRTUAL_CROSSINGS];
    00048   Vector2<double> tCrossings[NUMBER_OF_T_CROSSINGS];
    00049   Vector2<double> lCrossings[NUMBER_OF_L_CROSSINGS];
    00050   Vector2<double> falseCrossings[NUMBER_OF_FALSE_CROSSINGS];
    00051
    00052 private:
    00053
    00054   // private vars
    00055
    00056   // private methods
    00057   void initAllCrossings();
    00058   void initVirtualCrossings();
    00059   void initTCrossings();
    00060   void initLCrossings();
    00061   void initFalseCrossings();
    00062 };
    00063 #endif