00001 #ifndef FRONTIER_SEARCH_H_ 00002 #define FRONTIER_SEARCH_H_ 00003 00004 #include <frontier_exploration/Frontier.h> 00005 #include <costmap_2d/costmap_2d.h> 00006 00007 namespace frontier_exploration{ 00008 00012 class FrontierSearch{ 00013 00014 public: 00015 00020 FrontierSearch(costmap_2d::Costmap2D& costmap); 00021 00027 std::list<Frontier> searchFrom(geometry_msgs::Point position); 00028 00029 protected: 00030 00038 Frontier buildNewFrontier(unsigned int initial_cell, unsigned int reference, std::vector<bool>& frontier_flag); 00039 00046 bool isNewFrontierCell(unsigned int idx, const std::vector<bool>& frontier_flag); 00047 00048 private: 00049 00050 costmap_2d::Costmap2D& costmap_; 00051 unsigned char* map_; 00052 unsigned int size_x_ , size_y_; 00053 00054 }; 00055 00056 } 00057 #endif