35 #ifndef COSTMAP_QUEUE_COSTMAP_QUEUE_H 36 #define COSTMAP_QUEUE_COSTMAP_QUEUE_H 63 CellData(
const double d,
const unsigned int x,
const unsigned int y,
const unsigned int sx,
const unsigned int sy) :
113 void reset()
override;
120 void enqueueCell(
unsigned int x,
unsigned int y);
133 virtual int getMaxDistance()
const {
return std::max(costmap_.getWidth(), costmap_.getHeight()); }
145 using Ptr = std::shared_ptr<CostmapQueue>;
150 void enqueueCell(
unsigned int cur_x,
unsigned int cur_y,
unsigned int src_x,
unsigned int src_y);
179 const unsigned int src_x,
const unsigned int src_y)
181 unsigned int dx = std::abs(static_cast<int>(cur_x) - static_cast<int>(src_x));
182 unsigned int dy = std::abs(static_cast<int>(cur_y) - static_cast<int>(src_y));
183 return cached_distances_[dx][dy];
190 #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