While reviewing planning_graph.cpp I noticed in getShortestPath() in the loop that looks for the goal ending point with the smallest cost, it is wasting some computation. In its current form it walks in reverse each best found shortest path, which in the worse case means it could have to generate a candidate solution path for every goal state. This seems like a simple fix of storing the end_point with the smallest weight, then afterwards creating the path.
Note I have not tested this at runtime because I'm not using this function atm.
While reviewing planning_graph.cpp I noticed in getShortestPath() in the loop that looks for the goal ending point with the smallest cost, it is wasting some computation. In its current form it walks in reverse each best found shortest path, which in the worse case means it could have to generate a candidate solution path for every goal state. This seems like a simple fix of storing the
end_point
with the smallest weight, then afterwards creating the path.Note I have not tested this at runtime because I'm not using this function atm.