Extension of Costmap Queue where distances are limited to a given distance from source cells. More...
#include <limited_costmap_queue.h>
Public Member Functions | |
int | getMaxDistance () const override |
Get the maximum x or y distance we'll need to calculate the distance between. More... | |
LimitedCostmapQueue (nav_core2::Costmap &costmap, const int cell_distance_limit) | |
Constructor with limit as an integer number of cells. More... | |
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 (nav_core2::Costmap &costmap, bool manhattan=false) | |
constructor More... | |
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... | |
void | reset () override |
Clear the queue. More... | |
Public Member Functions inherited from costmap_queue::MapBasedQueue< CellData > | |
void | enqueue (const double priority, CellDataitem) |
Add a new item to the queue with a set priority. More... | |
CellData & | front () |
Return the item at the front of the queue. More... | |
bool | isEmpty () |
Check to see if there is anything in the queue. More... | |
MapBasedQueue (bool reset_bins=true) | |
Default Constructor. More... | |
void | pop () |
Remove (and destroy) the item at the front of the queue. More... | |
Protected Attributes | |
int | max_distance_ |
Protected Attributes inherited from costmap_queue::CostmapQueue | |
std::vector< std::vector< double > > | cached_distances_ |
int | cached_max_distance_ |
nav_core2::Costmap & | costmap_ |
bool | manhattan_ |
nav_grid::VectorNavGrid< unsigned char > | seen_ |
Protected Attributes inherited from costmap_queue::MapBasedQueue< CellData > | |
ItemMap | item_bins_ |
unsigned int | item_count_ |
ItemMapIterator | iter_ |
ItemMapIterator | last_insert_iter_ |
bool | reset_bins_ |
Additional Inherited Members | |
Public Types inherited from costmap_queue::CostmapQueue | |
using | Ptr = std::shared_ptr< CostmapQueue > |
convenience definition for a pointer More... | |
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 | computeCache () |
Compute the cached distances. More... | |
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... | |
void | enqueueCell (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. More... | |
Extension of Costmap Queue where distances are limited to a given distance from source cells.
Definition at line 47 of file limited_costmap_queue.h.
costmap_queue::LimitedCostmapQueue::LimitedCostmapQueue | ( | nav_core2::Costmap & | costmap, |
const int | cell_distance_limit | ||
) |
Constructor with limit as an integer number of cells.
Definition at line 39 of file limited_costmap_queue.cpp.
|
overridevirtual |
Get the maximum x or y distance we'll need to calculate the distance between.
Reimplemented from costmap_queue::CostmapQueue.
Definition at line 46 of file limited_costmap_queue.cpp.
|
overridevirtual |
Check to see if we should add this cell to the queue. Always true unless overridden.
cell | The cell to check |
Reimplemented from costmap_queue::CostmapQueue.
Definition at line 51 of file limited_costmap_queue.cpp.
|
protected |
Definition at line 57 of file limited_costmap_queue.h.