Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
Public Member Functions | List of all members
costmap_queue::LimitedCostmapQueue Class Reference

Extension of Costmap Queue where distances are limited to a given distance from source cells. More...

#include <nav2_dwb_controller/costmap_queue/include/costmap_queue/limited_costmap_queue.hpp>

Inheritance diagram for costmap_queue::LimitedCostmapQueue:
Inheritance graph
[legend]
Collaboration diagram for costmap_queue::LimitedCostmapQueue:
Collaboration graph
[legend]

Public Member Functions

 LimitedCostmapQueue (nav2_costmap_2d::Costmap2D &costmap, const int cell_distance_limit)
 Constructor with limit as an integer number of cells.
 
bool validCellToQueue (const 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.
 
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...
 
CellDatafront ()
 Return the item at the front of the queue. More...
 
void pop ()
 Remove (and destroy) the item at the front of the queue.
 

Additional Inherited Members

- Public Types inherited from costmap_queue::CostmapQueue
typedef std::shared_ptr< CostmapQueuePtr
 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...
 
- Protected Attributes inherited from costmap_queue::CostmapQueue
nav2_costmap_2d::Costmap2Dcostmap_
 
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_
 

Detailed Description

Extension of Costmap Queue where distances are limited to a given distance from source cells.

Definition at line 47 of file limited_costmap_queue.hpp.

Member Function Documentation

◆ validCellToQueue()

bool costmap_queue::LimitedCostmapQueue::validCellToQueue ( const 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 overridden

Reimplemented from costmap_queue::CostmapQueue.

Definition at line 49 of file limited_costmap_queue.cpp.


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