Hybrid A* Planner
 All Classes Namespaces Files Functions Variables Friends Pages
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
HybridAStar::DynamicVoronoi Class Reference

A DynamicVoronoi object computes and updates a distance map and Voronoi diagram. More...

#include <dynamicvoronoi.h>

Classes

struct  dataCell
 

Public Types

enum  State {
  voronoiKeep = -4, freeQueued = -3, voronoiRetry = -2, voronoiPrune = -1,
  free = 0, occupied = 1
}
 
enum  QueueingState {
  fwNotQueued = 1, fwQueued = 2, fwProcessed = 3, bwQueued = 4,
  bwProcessed = 1
}
 
enum  ObstDataState { invalidObstData = SHRT_MAX / 2 }
 
enum  markerMatchResult { pruned, keep, retry }
 

Public Member Functions

void initializeEmpty (int _sizeX, int _sizeY, bool initGridMap=true)
 Initialization with an empty map.
 
void initializeMap (int _sizeX, int _sizeY, bool **_gridMap)
 Initialization with a given binary map (false==free, true==occupied)
 
void occupyCell (int x, int y)
 add an obstacle at the specified cell coordinate
 
void clearCell (int x, int y)
 remove an obstacle at the specified cell coordinate
 
void exchangeObstacles (std::vector< INTPOINT > newObstacles)
 remove old dynamic obstacles and add the new ones
 
void update (bool updateRealDist=true)
 update distance map and Voronoi diagram to reflect the changes
 
void prune ()
 prune the Voronoi diagram
 
float getDistance (int x, int y)
 returns the obstacle distance at the specified location
 
bool isVoronoi (int x, int y)
 returns whether the specified cell is part of the (pruned) Voronoi graph
 
bool isOccupied (int x, int y)
 checks whether the specficied location is occupied
 
void visualize (const char *filename="result.ppm")
 write the current distance map and voronoi diagram as ppm file
 
unsigned int getSizeX ()
 returns the horizontal size of the workspace/map
 
unsigned int getSizeY ()
 returns the vertical size of the workspace/map
 
void setObstacle (int x, int y)
 
void removeObstacle (int x, int y)
 
void checkVoro (int x, int y, int nx, int ny, dataCell &c, dataCell &nc)
 
void recheckVoro ()
 
void commitAndColorize (bool updateRealDist=true)
 
void reviveVoroNeighbors (int &x, int &y)
 
bool isOccupied (int &x, int &y, dataCell &c)
 
markerMatchResult markerMatch (int x, int y)
 

Public Attributes

BucketPrioQueue open
 
std::queue< INTPOINT > pruneQueue
 
std::vector< INTPOINT > removeList
 
std::vector< INTPOINT > addList
 
std::vector< INTPOINT > lastObstacles
 
int sizeY
 
int sizeX
 
dataCell ** data
 
bool ** gridMap
 
int padding
 
double doubleThreshold
 
double sqrt2
 

Detailed Description

A DynamicVoronoi object computes and updates a distance map and Voronoi diagram.


The documentation for this class was generated from the following files: