Nav2 Navigation Stack - humble  humble
ROS 2 Navigation Stack
Public Member Functions | Protected Attributes | List of all members
dwb_critics::MapGridCritic::MapGridQueue Class Reference

Subclass of CostmapQueue that avoids Obstacles and Unknown Values. More...

#include <nav2_dwb_controller/dwb_critics/include/dwb_critics/map_grid.hpp>

Inheritance diagram for dwb_critics::MapGridCritic::MapGridQueue:
Inheritance graph
[legend]
Collaboration diagram for dwb_critics::MapGridCritic::MapGridQueue:
Collaboration graph
[legend]

Public Member Functions

 MapGridQueue (nav2_costmap_2d::Costmap2D &costmap, MapGridCritic &parent)
 
bool validCellToQueue (const costmap_queue::CellData &cell) override
 Check to see if we should add this cell to the queue. Always true unless overridden. More...
 
- Public Member Functions inherited from costmap_queue::CostmapQueue
 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...
 
- Public Member Functions inherited from costmap_queue::MapBasedQueue< CellData >
 MapBasedQueue (bool reset_bins=true)
 Default Constructor.
 
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 Attributes

MapGridCritic & parent_
 
- Protected Attributes inherited from costmap_queue::CostmapQueue
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

- Public Types inherited from costmap_queue::CostmapQueue
typedef std::shared_ptr< CostmapQueue > Ptr
 convenience typedef for a pointer
 
- Protected Types inherited from costmap_queue::MapBasedQueue< CellData >
using ItemMap = std::map< double, std::vector< CellData > >
 
using ItemMapIterator = typename ItemMap::iterator
 
- Protected Member Functions inherited from costmap_queue::CostmapQueue
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...
 

Detailed Description

Subclass of CostmapQueue that avoids Obstacles and Unknown Values.

Definition at line 111 of file map_grid.hpp.

Member Function Documentation

◆ validCellToQueue()

bool dwb_critics::MapGridCritic::MapGridQueue::validCellToQueue ( const costmap_queue::CellData &  )
overridevirtual

Check to see if we should add this cell to the queue. Always true unless overridden.

Parameters
cellThe cell to check
Returns
True, unless overriden

Reimplemented from costmap_queue::CostmapQueue.

Definition at line 53 of file map_grid.cpp.


The documentation for this class was generated from the following files: