|
Nav2 Navigation Stack - rolling
main
ROS 2 Navigation Stack
|


Public Types | |
| typedef std::shared_ptr< CostmapQueue > | Ptr |
| convenience typedef for a pointer | |
Public Member Functions | |
| CostmapQueue (nav2_costmap_2d::Costmap2D &costmap, bool manhattan=false) | |
| constructor More... | |
| void | reset () override |
| Clear the queue. | |
| void | enqueueCell (unsigned int x, unsigned int y) |
| Add a cell the queue. More... | |
| CellData | getNextCell () |
| Get the next cell to examine, and enqueue its neighbors as needed. More... | |
| virtual bool | validCellToQueue (const CellData &) |
| Check to see if we should add this cell to the queue. Always true unless overridden. More... | |
Public Member Functions inherited from costmap_queue::MapBasedQueue< CellData > | |
| MapBasedQueue (bool reset_bins=true) | |
| Default Constructor. | |
| virtual | ~MapBasedQueue ()=default |
| Default virtual Destructor. | |
| void | enqueue (const double priority, CellData item) |
| Add a new item to the queue with a set priority. More... | |
| bool | isEmpty () |
| Check to see if there is anything in the queue. More... | |
| CellData & | front () |
| Return the item at the front of the queue. More... | |
| void | pop () |
| Remove (and destroy) the item at the front of the queue. | |
Protected Member Functions | |
| void | enqueueCell (unsigned int index, unsigned int cur_x, unsigned int cur_y, unsigned int src_x, unsigned int src_y) |
| Enqueue a cell with the given coordinates and the given source cell. | |
| void | computeCache () |
| Compute the cached distances. | |
| double | distanceLookup (const unsigned int cur_x, const unsigned int cur_y, const unsigned int src_x, const unsigned int src_y) |
| Lookup pre-computed distances. More... | |
Protected Attributes | |
| nav2_costmap_2d::Costmap2D & | costmap_ |
| std::vector< bool > | seen_ |
| int | max_distance_ |
| bool | manhattan_ |
| std::vector< std::vector< double > > | cached_distances_ |
| int | cached_max_distance_ |
Protected Attributes inherited from costmap_queue::MapBasedQueue< CellData > | |
| bool | reset_bins_ |
| ItemMap | item_bins_ |
| unsigned int | item_count_ |
| ItemMapIterator | iter_ |
| ItemMapIterator | last_insert_iter_ |
Additional Inherited Members | |
Protected Types inherited from costmap_queue::MapBasedQueue< CellData > | |
| using | ItemMap = std::map< double, std::vector< CellData > > |
| using | ItemMapIterator = typename ItemMap::iterator |
Definition at line 108 of file costmap_queue.hpp.
|
explicit |
constructor
| costmap | Costmap which defines the size/number of cells |
| manhattan | If true, sort cells by Manhattan distance, otherwise use Euclidean distance |
Definition at line 44 of file costmap_queue.cpp.
References reset().

|
inlineprotected |
Lookup pre-computed distances.
| cur_x | The x coordinate of the current cell |
| cur_y | The y coordinate of the current cell |
| src_x | The x coordinate of the source cell |
| src_y | The y coordinate of the source cell |
Definition at line 176 of file costmap_queue.hpp.
Referenced by enqueueCell().

| void costmap_queue::CostmapQueue::enqueueCell | ( | unsigned int | x, |
| unsigned int | y | ||
| ) |
Add a cell the queue.
| x | X coordinate of the cell |
| y | Y coordinate of the cell |
Definition at line 62 of file costmap_queue.cpp.
References nav2_costmap_2d::Costmap2D::getIndex().
Referenced by getNextCell().


| CellData costmap_queue::CostmapQueue::getNextCell | ( | ) |
Get the next cell to examine, and enqueue its neighbors as needed.
NB: Assumes that isEmpty has been called before this call and returned false
Definition at line 84 of file costmap_queue.cpp.
References enqueueCell(), costmap_queue::MapBasedQueue< CellData >::front(), nav2_costmap_2d::Costmap2D::getSizeInCellsX(), nav2_costmap_2d::Costmap2D::getSizeInCellsY(), and costmap_queue::MapBasedQueue< CellData >::pop().

|
inlinevirtual |
Check to see if we should add this cell to the queue. Always true unless overridden.
| cell | The cell to check |
Reimplemented in dwb_critics::MapGridCritic::MapGridQueue, and costmap_queue::LimitedCostmapQueue.
Definition at line 143 of file costmap_queue.hpp.
Referenced by enqueueCell().
