ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Attempting to answer the questions for whoever that might find them useful :

* line 161,what does “ *float *potarr ” mean, What it is used for? What is the difference between “potarr array”and “cost array”?

Literally speaking, Cost array are the raw cost values for each cell from the 2D cost map and Potarr is the potential that the navfn propogation function assigns to each cell during traversal which can be later used to find the final path using gradient descent.

 line 167*,what does “ int *curp , int *nextp ,int *overp ”mean,what are they used for?

The propogation function uses three priority buffers namely current buffer, next buffer and over buffers, these three pointer variables that you have mentioned point to elements inside the three buffers

n the navfn/include/navfn/navfn.cpp, I think like Astar algorithm (basically understand its principle), in the code ,there are two lists, OPEN and CLOSED,where are they ,how does the "updateCell function"line 472,update ?

Update cell function in navfn has the following steps in brief :

  1. ensure cell does not have lethal obstacle cost
  2. Find potentials of the four neighbouring cells from potarr (potarr is initialised to inifinity by default) and find the lowest potential among them
  3. Calculate new potential of the cell using this lowest potential and the traversibility factor
  4. If this calculated potential is lower than the existing potential of the cell in potarr, assign this potential then use this to calculate the new potentials for neighbouring cells as well and push the neighbours to next/over buffer accordingly