MRXT: The Multi-Robot eXploration Tool
Multi-Robot autonomous exploration and mapping simulator.
|
00001 /* 00002 * 00003 * Author: Miguel Julia <mjulia@umh.es> 00004 * 00005 * Date: 2008 00006 * 00007 * Abstract Class Planner 00008 * 00009 */ 00010 00011 #pragma once 00012 #ifndef __PLANNER__ 00013 #define __PLANNER__ 00014 00015 #include <iostream> 00016 #include <stdlib.h> 00017 #include "ComThread.h" 00018 #include "ClMutex.h" 00019 #include "stepEvent.h" 00020 #include "slamInterface.h" 00021 #include "treeNode.h" 00022 #include "reactive.h" 00023 00024 /** 00025 * @brief Implements common methods for planning algorithms 00026 * 00027 */ 00028 00029 class planner: public ComThread{ 00030 00031 /////////////////////////////////////////////////////////////////////// 00032 //------------------------- Attributes ------------------------------ 00033 /////////////////////////////////////////////////////////////////////// 00034 00035 public: 00036 00037 stepEventManager explorationFinished; 00038 00039 protected: 00040 00041 slamInterface* mySlam; 00042 reactive* reac; 00043 robotBase* rbase; 00044 int number; 00045 char* logstr; 00046 00047 //--------------------------------------------------------------------- 00048 /////////////////////////////////////////////////////////////////////// 00049 00050 /////////////////////////////////////////////////////////////////////// 00051 //------------------------- Methods --------------------------------- 00052 /////////////////////////////////////////////////////////////////////// 00053 00054 public: 00055 00056 planner(); 00057 virtual ~planner(); 00058 planner(const ConfigFile& config){}; 00059 00060 void setSlam(slamInterface& slamProc); 00061 void setReactive(reactive& reac); 00062 void setRBase(robotBase& rb); 00063 00064 void setRobot(int number); 00065 void setLogName(const char*); 00066 00067 //--------------------------------------------------------------------- 00068 /////////////////////////////////////////////////////////////////////// 00069 }; 00070 00071 typedef Loki::Functor<planner*, LOKI_TYPELIST_1(const ConfigFile&)> plannerCreator; 00072 typedef Loki::SingletonHolder< Loki::Factory< planner, int, LOKI_TYPELIST_1(const ConfigFile&)> > plannerFactory; 00073 00074 #endif