Skip to content

Commit c24cfa9

Browse files
Carl DelseyDLu
Carl Delsey
authored andcommitted
Fix a bug with costmap_queue getNextCell (#25)
1 parent 5564bf4 commit c24cfa9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

costmap_queue/src/costmap_queue.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ CellData CostmapQueue::getNextCell()
7676
{
7777
// get the highest priority cell and pop it off the priority queue
7878
CellData current_cell = front();
79+
pop();
7980

8081
unsigned int mx = current_cell.x_;
8182
unsigned int my = current_cell.y_;
@@ -92,8 +93,6 @@ CellData CostmapQueue::getNextCell()
9293
if (my < costmap_.getHeight() - 1)
9394
enqueueCell(mx, my + 1, sx, sy);
9495

95-
// pop once we have our cell info
96-
pop();
9796
return current_cell;
9897
}
9998

0 commit comments

Comments
 (0)