35 #ifndef COSTMAP_QUEUE_COSTMAP_QUEUE_H 36 #define COSTMAP_QUEUE_COSTMAP_QUEUE_H 62 CellData(
const double d,
const unsigned int x,
const unsigned int y,
const unsigned int sx,
const unsigned int sy) :
112 void reset()
override;
119 void enqueueCell(
unsigned int x,
unsigned int y);
132 virtual int getMaxDistance()
const {
return std::max(costmap_.getWidth(), costmap_.getHeight()); }
144 using Ptr = std::shared_ptr<CostmapQueue>;
149 void enqueueCell(
unsigned int cur_x,
unsigned int cur_y,
unsigned int src_x,
unsigned int src_y);
178 const unsigned int src_x,
const unsigned int src_y)
180 unsigned int dx = std::abs(static_cast<int>(cur_x) - static_cast<int>(src_x));
181 unsigned int dy = std::abs(static_cast<int>(cur_y) - static_cast<int>(src_y));
182 return cached_distances_[dx][dy];
189 #endif // COSTMAP_QUEUE_COSTMAP_QUEUE_H 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.
CellData()
Default Constructor - Should be used sparingly.
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
std::vector< std::vector< double > > cached_distances_
A tool for finding the cells closest to some set of originating cells.
virtual int getMaxDistance() const
Get the maximum x or y distance we'll need to calculate the distance between.
TFSIMD_FORCE_INLINE const tfScalar & y() const
Templatized interface for a priority queue.
TFSIMD_FORCE_INLINE const tfScalar & x() const
nav_grid::VectorNavGrid< unsigned char > seen_
Storage for cell information used during queue expansion.
nav_core2::Costmap & costmap_
CellData(const double d, const unsigned int x, const unsigned int y, const unsigned int sx, const unsigned int sy)
Real Constructor.
std::shared_ptr< CostmapQueue > Ptr
convenience definition for a pointer