Skip to content

JPS

python_motion_planning.global_planner.graph_search.jps.JPS

Bases: AStar

Class for JPS motion planning.

Parameters:

Name Type Description Default
start tuple

start point coordinate

required
goal tuple

goal point coordinate

required
env Env

environment

required
heuristic_type str

heuristic function type

'euclidean'

Examples:

Python Console Session
>>> import python_motion_planning as pmp
>>> planner = pmp.JPS((5, 5), (45, 25), pmp.Grid(51, 31))
>>> cost, path, expand = planner.plan()     # planning results only
>>> planner.plot.animation(path, str(planner), cost, expand)  # animation
>>> planner.run()       # run both planning and animation
References

[1] Online Graph Pruning for Pathfinding On Grid Maps

detectForceNeighbor(node, motion)

Detect forced neighbor of node.

Parameters:

Name Type Description Default
node Node

current node

required
motion Node

the motion that current node executes

required

Returns:

Name Type Description
flag bool

True if current node has forced neighbor else Flase

jump(node, motion)

Jumping search recursively.

Parameters:

Name Type Description Default
node Node

current node

required
motion Node

the motion that current node executes

required

Returns:

Name Type Description
jump_point Node

jump point or None if searching fails

plan()

JPS motion plan function.

Returns:

Name Type Description
cost float

path cost

path list

planning path

expand list

all nodes that planner has searched