Go to the documentation of this file.
50 #define COST_UNKNOWN_ROS 255 // 255 is unknown cost
51 #define COST_OBS 254 // 254 for forbidden regions
52 #define COST_OBS_ROS 253 // ROS values of 253 are obstacles
64 #define COST_NEUTRAL 50 // Set this to "open space" value
65 #define COST_FACTOR 0.8 // Used for translating costs in NavFn::setCostmap()
71 #define COSTTYPE unsigned char // Whatever is used...
75 #define POT_HIGH 1.0e10 // unassigned cell potential
78 #define PRIORITYBUFSIZE 10000
98 float *plan,
int nplan);
250 int calcPath(
int n,
int *st = NULL);
261 void savemap(
const char *fname);
bool calcNavFnDijkstra(bool atStart=false)
Caclulates the full navigation function using Dijkstra.
void setGoal(int *goal)
Sets the goal position for the planner. Note: the navigation cost field computed gives the cost to ge...
void initCost(int k, float v)
Initialize cell k with cost v for propagation.
void setNavArr(int nx, int ny)
Sets or resets the size of the map.
bool propNavFnAstar(int cycles)
Run propagation for <cycles> iterations, or until start is reached using the best-first A* method wit...
Navigation function class. Holds buffers for costmap, navfn map. Maps are pixel-based....
void savemap(const char *fname)
int calcPath(int n, int *st=NULL)
Calculates the path for at mose <n> cycles.
void updateCellAstar(int n)
Updates the cell at index n using the A* heuristic.
int create_nav_plan_astar(COSTTYPE *costmap, int nx, int ny, int *goal, int *start, float *plan, int nplan)
void updateCell(int n)
Updates the cell at index n
NavFn(int nx, int ny)
Constructs the planner.
bool propNavFnDijkstra(int cycles, bool atStart=false)
Run propagation for <cycles> iterations, or until start is reached using breadth-first Dijkstra metho...
bool calcNavFnAstar()
Calculates a plan using the A* heuristic, returns true if one is found.
void setupNavFn(bool keepit=false)
int getPathLen()
Accessor for the length of a path.
void setCostmap(const COSTTYPE *cmap, bool isROS=true, bool allow_unknown=true)
Set up the cost array for the planner, usually from ROS
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.
void setStart(int *start)
Sets the start position for the planner. Note: the navigation cost field computed gives the cost to g...
float * getPathX()
Accessor for the x-coordinates of a path.
float * getPathY()
Accessor for the y-coordinates of a path.
void(* displayFn)(NavFn *nav)
navfn
Author(s): Kurt Konolige, Eitan Marder-Eppstein, contradict@gmail.com
autogenerated on Mon Mar 6 2023 03:50:37