MapInflationTool.h
Go to the documentation of this file.
1 #ifndef MAP_INFLATION_TOOL_H
2 #define MAP_INFLATION_TOOL_H
3 
4 #include <queue>
5 
6 #include <ros/ros.h>
8 
9 class CellData
10 {
11 public:
12  CellData(double d, double i, unsigned int sx, unsigned int sy);
13  double distance;
14  unsigned int index;
15  unsigned int sx, sy;
16 };
17 
18 inline bool operator<(const CellData &a, const CellData &b)
19 {
20  return a.distance > b.distance;
21 }
22 
23 
25 {
26 public:
29 
30  void computeCaches(unsigned int radius);
31  void inflateMap(GridMap* map);
32 
33 private:
34  void enqueueObstacle(unsigned int index, unsigned int sx, unsigned int sy);
35  inline double distanceLookup(int mx, int my, int src_x, int src_y);
36  inline signed char costLookup(int mx, int my, int src_x, int src_y);
37 
39 
40  unsigned int mCellInflationRadius;
41  signed char** mCachedCosts;
42  double ** mCachedDistances;
43 
44  std::priority_queue<CellData> mInflationQueue;
45  unsigned char* mInflationMarkers;
46 
47  signed char mCostObstacle;
48 // char mCostLethal;
49 };
50 
51 #endif
d
Definition: GridMap.h:7
unsigned int index
CellData(double d, double i, unsigned int sx, unsigned int sy)
bool operator<(const CellData &a, const CellData &b)
unsigned char * mInflationMarkers
signed char mCostObstacle
double ** mCachedDistances
std::priority_queue< CellData > mInflationQueue
signed char ** mCachedCosts
unsigned int mCellInflationRadius
unsigned int sy
unsigned int sx
double distance


nav2d_navigator
Author(s): Sebastian Kasperski
autogenerated on Thu Jun 6 2019 19:20:43