42 MapBasedQueue(false), costmap_(costmap), seen_(0), manhattan_(manhattan), cached_max_distance_(-1)
61 unsigned int src_x,
unsigned int src_y)
63 if (
seen_(cur_x, cur_y))
return;
67 CellData data(distance, cur_x, cur_y, src_x, src_y);
81 unsigned int mx = current_cell.
x_;
82 unsigned int my = current_cell.
y_;
83 unsigned int sx = current_cell.
src_x_;
84 unsigned int sy = current_cell.
src_y_;
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.
void reset() override
Clear the queue.
CellData & front()
Return the item at the front of the queue.
virtual bool validCellToQueue(const CellData &cell)
Check to see if we should add this cell to the queue. Always true unless overridden.
nav_core2::BasicCostmap costmap
void enqueue(const double priority, CellDataitem)
Add a new item to the queue with a set priority.
std::vector< std::vector< double > > cached_distances_
CostmapQueue(nav_core2::Costmap &costmap, bool manhattan=false)
constructor
virtual int getMaxDistance() const
Get the maximum x or y distance we'll need to calculate the distance between.
TFSIMD_FORCE_INLINE tfScalar distance(const Vector3 &v) const
void computeCache()
Compute the cached distances.
void enqueueCell(unsigned int x, unsigned int y)
Add a cell the queue.
void pop()
Remove (and destroy) the item at the front of the queue.
void setInfo(const NavGridInfo &new_info) override
Templatized interface for a priority queue.
nav_grid::VectorNavGrid< unsigned char > seen_
Storage for cell information used during queue expansion.
void setValue(const unsigned int x, const unsigned int y, const T &value) override
virtual void reset()
Clear the queue.
nav_core2::Costmap & costmap_
CellData getNextCell()
Get the next cell to examine, and enqueue its neighbors as needed.