irsim.lib.path_planners.jps#

Jump Point Search (JPS) grid planning.

An optimization of A* for uniform-cost grids that prunes symmetric paths and expands "jump points" only, preserving optimality while reducing nodes expanded.

Collision precedence:
  1. Grid lookup when env_map.grid is not None; if occupied, collision.

2. When the grid reports free or is unavailable, Shapely vs. obstacle_list. (Grid and obstacle_list are combined when both are present.)

引用

Attributes#

Classes#

JPSPlanner

Jump Point Search planner for uniform-cost 8-connected grids.

Module Contents#

irsim.lib.path_planners.jps.JpsSuccessor#
class irsim.lib.path_planners.jps.JPSPlanner(env_map: irsim.world.map.EnvGridMap)[源代码]#

Jump Point Search planner for uniform-cost 8-connected grids.

When the environment map carries an occupancy grid (env_map.grid), collision checks use a fast O(1) grid lookup. Otherwise, the planner falls back to Shapely geometry intersection (same as AStarPlanner).

Initialize JPS planner.

参数:

env_map -- Environment map (any EnvGridMap compatible object). Resolution and bounds are taken from the map (same as AStarPlanner).

origin_x#
origin_y#
max_x#
max_y#
obstacle_list#
planning(start_pose: numpy.ndarray, goal_pose: numpy.ndarray, show_animation: bool = True) numpy.ndarray | None[源代码]#

JPS path search.

参数:
  • start_pose (np.ndarray) -- start pose [x, y]

  • goal_pose (np.ndarray) -- goal pose [x, y]

  • show_animation (bool) -- If true, shows the animation of planning process

返回:

shape (2, N) array [rx, ry] of the final path, or None if the start or goal cell is not walkable, or if no path exists (open set exhausted).

返回类型:

np.ndarray | None

calc_grid_position(index: int, min_position: float) float[源代码]#
calc_xy_index(position: float, min_pos: float) int[源代码]#
calc_grid_index_from_xy(x: int, y: int) int[源代码]#
is_collision(x: float, y: float) bool[源代码]#

True if world position (x, y) is in collision.