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: 2009 00006 * 00007 * Class IntegratedIGPlanner 00008 * 00009 */ 00010 00011 #pragma once 00012 #ifndef __IIG__PLANNER__ 00013 #define __IIG__PLANNER__ 00014 00015 #include <iostream> 00016 #include <stdlib.h> 00017 #include "ClThread.h" 00018 #include "ClMutex.h" 00019 #include "stepEvent.h" 00020 #include "slamInterface.h" 00021 #include "reactive.h" 00022 #include "planner.h" 00023 #include "pathPlanning.h" 00024 #include "ConfigFile.h" 00025 00026 00027 /** 00028 * @brief Implements an exploration algorithm directing the robot to the most informative path 00029 * 00030 * VAlue = IG + LOCALIZ - Cost 00031 * 00032 * IG: is the expected number of visible cells from that frontier cell 00033 * 00034 * LOCALIZ: Predicted localization level at the target point 00035 * 00036 * Cost: is the length of the path to arrive to the cell 00037 * 00038 * The target frontier cell that maximizes the value is chosen 00039 * 00040 */ 00041 class IntegratedIGPlanner: public planner{ 00042 00043 /////////////////////////////////////////////////////////////////////// 00044 //------------------------- Attributes ------------------------------ 00045 /////////////////////////////////////////////////////////////////////// 00046 00047 private: 00048 00049 //costMap* policy; 00050 bool completedPath; // Flag to set when path is finished 00051 bool showPlanner; // Flag that indicates if the planning figure must be displayed 00052 bool endPlanner; // Flag that indicates that the thread must conclude in the next iteration 00053 ClMutex closing; // Mutex for a right stopping of the thread 00054 std::vector<point> path; // planned path 00055 float vmax; 00056 00057 // parameters 00058 float replanning_period; 00059 int inflate_obstacles; 00060 float utility_radius; 00061 float utility_weight; 00062 float cost_weight; 00063 float localization_weight; 00064 float camrange; 00065 00066 //--------------------------------------------------------------------- 00067 /////////////////////////////////////////////////////////////////////// 00068 00069 /////////////////////////////////////////////////////////////////////// 00070 //------------------------- Methods --------------------------------- 00071 /////////////////////////////////////////////////////////////////////// 00072 00073 public: 00074 00075 /// Constructor 00076 IntegratedIGPlanner(const ConfigFile& config); 00077 /// Destructor 00078 virtual ~IntegratedIGPlanner(); 00079 00080 private: 00081 00082 int setup(); // Thread setup 00083 void onStop(); // Thread on stop 00084 void execute(); // Thead execution body 00085 00086 float IGutility(const gridMapInterface& omap, const binMap& esz); 00087 float LOCutility(const point& oc, const binMap esz, visualMap& vmap, const Ematrix& P); 00088 00089 matrix jacobianHm(const pose& pos); 00090 matrix jacobianHv(const pose& pos, const pos3d& mark); 00091 //--------------------------------------------------------------------- 00092 /////////////////////////////////////////////////////////////////////// 00093 }; 00094 00095 #endif 00096