3 typedef std::multimap<double,unsigned int>
Queue;
4 typedef std::pair<double,unsigned int>
Entry;
19 unsigned int mapSize = map->
getSize();
20 double* plan =
new double[mapSize];
21 for(
unsigned int i = 0; i < mapSize; i++)
28 Entry startPoint(0.0, start);
29 queue.insert(startPoint);
35 bool foundFrontier =
false;
44 distance = next->first;
45 unsigned int index = next->second;
64 for(
unsigned int it = 0; it < 4; it++)
66 unsigned int i = ind[it];
67 if(map->
isFree(i) && plan[i] == -1)
69 queue.insert(
Entry(distance+linear, i));
70 plan[i] = distance+linear;
76 ROS_DEBUG(
"Checked %d cells.", cellCount);
std::multimap< double, unsigned int > Queue
std::pair< double, unsigned int > Entry
~NearestFrontierPlanner()
std::multimap< double, unsigned int > Queue
bool isFree(unsigned int index)
double distance(double x0, double y0, double x1, double y1)
int findExplorationTarget(GridMap *map, unsigned int start, unsigned int &goal)
std::pair< double, unsigned int > Entry
bool isFrontier(unsigned int index)