ros-industrial-consortium / descartes

ROS-Industrial Special Project: Cartesian Path Planner
Apache License 2.0
126 stars 92 forks source link

Speed up search of planning graph #168

Closed davetcoleman closed 8 years ago

davetcoleman commented 8 years ago

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.

Jmeyer1292 commented 8 years ago

I think you're right, and I'll test tonight and merge if everything looks good.

Thanks, Dave.

Jmeyer1292 commented 8 years ago

+1, thanks again.