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

Modules/SpecialVision/ChallengeSpecialVision.h

Go to the documentation of this file.
00001 /**
00002 * @file ChallengeSpecialVision.h
00003 * 
00004 * Definition of class ChallengeSpecialVision
00005 * This class finds out the orientation of the robot for the "Almost-Slam-Challenge"
00006 *
00007 * @author Thomas Kindler
00008 * @author Matthias Hülsbusch
00009 * @author Michael Wachter
00010 */
00011 
00012 #ifndef __ChallengeSpecialVision_h_
00013 #define __ChallengeSpecialVision_h_
00014 
00015 #include "SpecialVision.h"
00016 
00017 
00018 #define NUMBEROFSECTORS 36
00019 
00020 class ChallengeSectorData
00021 {
00022 public:
00023   int numPixels[numOfColors];
00024 };
00025 
00026 
00027 class ChallengeSpecialVision : public SpecialVision
00028 {
00029 public:
00030   /** Constructor 
00031   * @param interfaces The interfaces of the SpecialVision module */
00032   ChallengeSpecialVision(const SpecialVisionInterfaces& interfaces);
00033 
00034   /** Executes the module */
00035   virtual void execute();
00036   
00037 private:
00038   void executeLearnOrientation();
00039   void executeFindOrientation();
00040   void executeGetOrientation();
00041   void executeReset();
00042   ChallengeSectorData countPixels(int x1,int x2,int y1,int y2);
00043   
00044 private:
00045   void sort( double* a, const int number);
00046   double alngleDifDegree(double a, double b);
00047   double flagAngle[MAXLEARNFLAGS];
00048   double foundAngle[MAXLEARNFLAGS];
00049   int flagCount;
00050   int foundAngleCount;
00051 
00052 private:
00053   ChallengeSectorData data[NUMBEROFSECTORS];
00054 
00055 };
00056 
00057 #endif// __BarCodeReader_h_

Generated on Mon Mar 20 21:59:57 2006 for GT2005 by doxygen 1.3.6