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

Modules/BehaviorControl/CommonXabsl2Symbols/ObstaclesSymbols.h

Go to the documentation of this file.
00001 /**
00002 * @file ObstaclesSymbols.h
00003 *
00004 * Declaration of class ObstaclesSymbols.
00005 *
00006 * @author Max Risler
00007 */
00008 
00009 #ifndef __ObstaclesSymbols_h_
00010 #define __ObstaclesSymbols_h_
00011 
00012 #include "../BehaviorControl.h"
00013 #include "Tools/Xabsl2/Xabsl2Engine/Xabsl2Engine.h"
00014 
00015 
00016 /**
00017 * The Xabsl2 symbols that are defined in "obstacles-symbols.xml"
00018 *
00019 * @author Max Risler
00020 */
00021 class ObstaclesSymbols : public Xabsl2FunctionProvider, public BehaviorControlInterfaces
00022 {
00023 public:
00024 /*
00025 * Constructor.
00026 * @param interfaces The paramters of the BehaviorControl module.
00027   */
00028   ObstaclesSymbols(const BehaviorControlInterfaces& interfaces);
00029 
00030   
00031   enum { sizeOfArray = 5 };
00032 
00033   double lastValuesLeft[sizeOfArray];
00034   int lastValuesMiddle[sizeOfArray];
00035   double lastValuesRight[sizeOfArray];
00036 
00037 
00038   /** registers the symbols at an engine */
00039   void registerSymbols(Xabsl2Engine& engine);
00040 
00041     /** updates the symbols */
00042   void update();
00043 
00044   //!@name Input symbols
00045   //!@{
00046   bool getCollisionFrontLeft();  /*!< A function for the symbol "self.collision-front-left" */
00047   bool getCollisionFrontRight();  /*!< A function for the symbol "self.collision-front-right" */
00048   bool getCollisionHindLeft();  /*!< A function for the symbol "self.collision-hind-left" */
00049   bool getCollisionHindRight();  /*!< A function for the symbol "self.collision-hind-right" */
00050   bool getCollisionHead();  /*!< A function for the symbol "self.collision-head" */
00051   bool getCollisionAggregate();  /*!< A function for the symbol "self.collision-aggregate" */
00052   double getOdometryDisturbance(); /*!< A function for the symbol "self.odometry-disturbance" */
00053   double getConsecutiveCollisionTimeFrontLeft();  /*!< A function for the symbol "self.consecutive-collision-time-front-left" */
00054   double getConsecutiveCollisionTimeFrontRight();  /*!< A function for the symbol "self.consecutive-collision-time-front-right" */
00055   double getConsecutiveCollisionTimeHindLeft();  /*!< A function for the symbol "self.consecutive-collision-time-hind-left" */
00056   double getConsecutiveCollisionTimeHindRight();  /*!< A function for the symbol "self.consecutive-collision-time-hind-right" */
00057   double getConsecutiveCollisionTimeHead();  /*!< A function for the symbol "self.consecutive-collision-time-head" */
00058   double getConsecutiveCollisionTimeAggregate();  /*!< A function for the symbol "self.consecutive-collision-time-aggregate" */
00059 
00060   double getMinDistanceLeft();
00061   double getMinDistanceRight();
00062   double getMinDistanceMiddle();
00063 
00064   int getCollisionSide();  /*!< A function for the symbol "self.collision-side" */
00065   bool getObstacleInFront();
00066   double getNearestObstacleFrontLeft();
00067   double getNearestObstacleFrontRight();
00068   //!@}
00069 
00070   /** Indicates if the robot is stuck (based on obstacles model)*/
00071   bool robotIsStuck;
00072 
00073   /** Indicates that there are close obstacles */
00074   bool obstaclesAreClose;
00075 
00076   /** Indicates that there are opponents in the direction of the ball */
00077   bool opponentsCloseToBall;
00078 };
00079 
00080 
00081 #endif // __ObstaclesSymbols_h_
00082 

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