src/RAstar.cpp
/****************************************************************************/
// Function Name: addNeighborCellToOpenList
// Inputs: the open list, the neighbors Cell, the g_score matrix,the goal cell
// Output:
// Description: it is used to add a neighbor Cell to the open list
/****************************************************************************/
Function Name: addNeighborCellToOpenList
Inputs: the open list, the neighbors Cell, the g_score matrix,the goal cell
Output:
Description: it is used to add a neighbor Cell to the open list
Function Name : addNeighborCellToOpenList Inputs : the open list the neighbors Cell the g_score matrix the goal cell Output : Description : it is used to add a neighbor Cell to the open list
void RAstarPlannerROS::addNeighborCellToOpenList(multiset<cells> &OPL,
                                                 int neighborCell, int goalCell,
                                                 float g_score[]) {
  cells CP;
  CP.currentCell = neighborCell;  
  CP.fCost =
      g_score[neighborCell] + .2 * calculateHCost(neighborCell, goalCell);
  OPL.insert(CP);
}
void RAstarPlannerROS :: addNeighborCellToOpenList ( multiset < cells > & OPL , int neighborCell , int goalCell , float g_score [ ] ) { cells CP ; CP . currentCell = neighborCell ; CP . fCost = g_score [ neighborCell ] + .2 * calculateHCost ( neighborCell , goalCell ) ; OPL . insert ( CP ) ; }
Function Name: addNeighborCellToOpenList
Inputs: the open list, the neighbors Cell, the g_score matrix,the goal cell
Output:
Description: it is used to add a neighbor Cell to the open list
Function Name : addNeighborCellToOpenList Inputs : the open list the neighbors Cell the g_score matrix the goal cell Output : Description : it is used to add a neighbor Cell to the open list
// insert the neighbor cell //  Add to previous line Cp.fCost = ...