Navigation function class. Holds buffers for costmap, navfn map. Maps are pixel-based. Origin is upper left, x is right, y is down.
More...
Public Member Functions |
bool | calcNavFnAstar () |
| Calculates a plan using the A* heuristic, returns true if one is found.
|
bool | calcNavFnDijkstra (bool atStart=false) |
| Caclulates the full navigation function using Dijkstra.
|
int | calcPath (int n, int *st=NULL) |
| Calculates the path for at mose <n> cycles.
|
void | display (void fn(NavFn *nav), int n=100) |
float | getLastPathCost () |
| Gets the cost of the path found the last time a navigation function was computed.
|
int | getPathLen () |
| Accessor for the length of a path.
|
float * | getPathX () |
| Accessor for the x-coordinates of a path.
|
float * | getPathY () |
| Accessor for the y-coordinates of a path.
|
float | gradCell (int n) |
void | initCost (int k, float v) |
| Initialize cell k with cost v for propagation.
|
| NavFn (int nx, int ny) |
| Constructs the planner.
|
bool | propNavFnAstar (int cycles) |
| Run propagation for <cycles> iterations, or until start is reached using the best-first A* method with Euclidean distance heuristic.
|
bool | propNavFnDijkstra (int cycles, bool atStart=false) |
| Run propagation for <cycles> iterations, or until start is reached using breadth-first Dijkstra method.
|
void | savemap (const char *fname) |
void | setCostmap (const COSTTYPE *cmap, bool isROS=true, bool allow_unknown=true) |
| Set up the cost array for the planner, usually from ROS.
|
void | setGoal (int *goal) |
| Sets the goal position for the planner. Note: the navigation cost field computed gives the cost to get to a given point from the goal, not from the start.
|
void | setNavArr (int nx, int ny) |
| Sets or resets the size of the map.
|
void | setObs () |
void | setStart (int *start) |
| Sets the start position for the planner. Note: the navigation cost field computed gives the cost to get to a given point from the goal, not from the start.
|
void | setupNavFn (bool keepit=false) |
void | updateCell (int n) |
| Updates the cell at index n.
|
void | updateCellAstar (int n) |
| Updates the cell at index n using the A* heuristic.
|
| ~NavFn () |
Public Attributes |
COSTTYPE * | costarr |
int * | curP |
int | curPe |
float | curT |
void(* | displayFn )(NavFn *nav) |
int | displayInt |
int | goal [2] |
float * | gradx |
float * | grady |
float | last_path_cost_ |
int * | nextP |
int | nextPe |
int | nobs |
int | npath |
int | npathbuf |
int | ns |
int | nx |
int | ny |
COSTTYPE * | obsarr |
int * | overP |
int | overPe |
float | pathStep |
float * | pathx |
float * | pathy |
int * | pb1 |
int * | pb2 |
int * | pb3 |
bool * | pending |
float * | potarr |
float | priInc |
int | start [2] |
Navigation function class. Holds buffers for costmap, navfn map. Maps are pixel-based. Origin is upper left, x is right, y is down.
Definition at line 95 of file navfn.h.