python_motion_planning icon indicating copy to clipboard operation
python_motion_planning copied to clipboard

the running time of JPS

Open GitaHubMartin opened this issue 1 year ago • 1 comments

Why is the python version of JPS not as efficient as A*?

GitaHubMartin avatar Jun 20 '24 11:06 GitaHubMartin

In my testing, JPS took much less time than A*. If you still encounter situations where JPS runtime performance is not as good as A*, please provide your map and specific runtime of the two planners. Below is a simple testing example:

import time
import python_motion_planning as pmp

a_star_planner = pmp.AStar((5, 5), (45, 25), pmp.Grid(51, 31))
start_time = time.time()
cost, path, expand = a_star_planner.plan()
print("AStar Planning time: ", time.time() - start_time)

jps_planner = pmp.JPS((5, 5), (45, 25), pmp.Grid(51, 31))
start_time = time.time()
cost, path, expand = jps_planner.plan()
print("JPS Planning time: ", time.time() - start_time)

omigeft avatar Jun 23 '24 05:06 omigeft