Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
RobotPursuer.hpp
Go to the documentation of this file.
00001 
00012 #ifndef LGL_ROBOT_PURSUER_HPP
00013 #define LGL_ROBOT_PURSUER_HPP
00014 
00015 #include <lgl/VisibilityMap.hpp>
00016 #include <lgl/PursuitNavigator.hpp>
00017 #include <lgl/PursuitGraph.hpp>
00018 #include <lgl/PursuitTaskManager.hpp>
00019 #include <lgl/CellID.hpp>
00020 
00021 #include <string>
00022 
00023 namespace jafar {
00024   namespace lgl {
00025 
00026 
00027     typedef enum {  
00028             IDLE,   // The robot has nothing to do
00029             BUSY,   // The robot is busy (with another mission than the pursuit one)
00030             SUPPORT,  // The robot is providing support for the pursuit mission
00031             TRACKER   // The robot is currently in charge of the target (tracking task)
00032       } ROBOT_STATE;
00033 
00037     class RobotPursuer {
00039     
00040       private :
00041 
00042         // ID of the robot
00043         int id ;
00044 
00045         // Parameters for the robot
00046         unsigned int horizon;           // temporal horizon
00047         unsigned int viewLength;        // viewLength
00048         unsigned int temporalTolerance; 
00049         unsigned int riskTermMaxValue; 
00050         double sensorsHeight;
00051 
00052         // State of the robot
00053         ROBOT_STATE state ;
00054 
00055         // Position of the robot
00056         Cell_ID position ;
00057 
00058         // Models for the robot
00059         std::string robotAccessibilityMap;
00060         std::string targetAccessibilityMap;
00061         std::string robotVisibilityMap;
00062 
00063         // Provide GeoData information and navigation services
00064         PursuitNavigator* navigator ;
00065 
00066         // VisibilityMap : use for visibility information
00067         GeoData*  geodata ;
00068         VisibilityMap* visibilityMap; 
00069 
00070         // PursuitGraph : use for the tracking task
00071         PursuitGraph* pursuitGraph; 
00072 
00073         // PursuitTaskManager : use for the support task management
00074         PursuitTaskManager pursuitTaskManager ;
00075 
00076         // PursuitSupport : use for the support task realisation
00077         //PursuitSupport pursuitSupport; 
00078 
00079 
00080       public : 
00081 
00083         RobotPursuer(   int _id,
00084                 std::string _robotAccessibilityMap,
00085                 std::string _targetAccessibilityMap,
00086                 std::string _robotVisibilityMap,
00087                 unsigned int _horizon = 20, // temporal horizon
00088                 unsigned int _viewLength= 20, // viewLength
00089                 unsigned int _temporalTolerance = 7, 
00090                 unsigned int _riskTermMaxValue = 7, 
00091                 double _sensorsHeight = 1,
00092                 ROBOT_STATE _state=IDLE,
00093                 Cell_ID _position=0 
00094         );
00095       
00096         RobotPursuer(   int _id,
00097                 std::string _robotAccessibilityMap,
00098                 std::string _targetAccessibilityMap,
00099                 std::string _robotVisibilityMap,
00100                 unsigned int _horizon = 20, // temporal horizon
00101                 unsigned int _viewLength= 20, // viewLength
00102                 unsigned int _temporalTolerance = 7, 
00103                 unsigned int _riskTermMaxValue = 7, 
00104                 double _sensorsHeight = 1,
00105                 ROBOT_STATE _state=IDLE,
00106                 int x = 0, int y = 0
00107         );
00108       
00110         ~RobotPursuer() ;
00111 
00112         /*  Actions */
00113         void start( int xTarget, int yTarget);
00114 
00115         void run( int xTarget, int yTarget);
00116 
00118         PursuitGraph* getPG() const;
00119 
00120         std::string getRobotAccessibilityMap()  const ;
00121         std::string getTargetAccessibilityMap() const ;
00122         std::string getRobotVisibilityMap()   const ;
00123 
00124         Cell_ID getPosition()   const ;
00125         void getPosition(int &x, int &y) const;
00126       private :
00127         void startTracking( int xTarget, int yTarget);
00128 
00129     };
00130 
00131   }
00132 }
00133 
00134 #endif /* LGL_ROBOT_PURSUER_HPP */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:24 for Jafar by doxygen 1.7.6.1
LAAS-CNRS