irsim.lib.path_planners.informed_rrt_star ========================================= .. py:module:: irsim.lib.path_planners.informed_rrt_star .. autoapi-nested-parse:: Informed RRT* path planner. Collision precedence (inherited from :class:`RRT`): 1. Grid lookup (O(1) per cell) when ``env_map.grid`` is not ``None``. 2. Shapely geometry intersection when the grid is unavailable. Informed RRT* improves upon RRT* by constraining the sampling region to an ellipsoidal subset of the planning space once an initial solution has been found. The ellipse is defined by the start and goal positions as foci, and the current best path cost determines its size. As the cost decreases, the ellipse shrinks, focusing exploration on the region that can actually produce shorter paths. Reference: J. D. Gammell, S. S. Srinivasa, and T. D. Barfoot, "Informed RRT*: Optimal Sampling-based Path Planning Focused via Direct Sampling of an Admissible Ellipsoidal Heuristic," in Proc. IEEE/RSJ Int. Conf. Intelligent Robots and Systems (IROS), 2014. Implementation reference: ZJU-FAST-Lab/sampling-based-path-finding https://github.com/ZJU-FAST-Lab/sampling-based-path-finding (C++ implementation of RRT* with informed sampling and ellipsoidal heuristic.) Adapted for ir-sim. Attributes ---------- .. autoapisummary:: irsim.lib.path_planners.informed_rrt_star.logger Classes ------- .. autoapisummary:: irsim.lib.path_planners.informed_rrt_star.InformedRRTStar Module Contents --------------- .. py:data:: logger .. py:class:: InformedRRTStar(env_map: irsim.world.map.EnvGridMap, robot: Any, expand_dis: float = 1.5, path_resolution: float = 0.25, goal_sample_rate: int = 10, max_iter: int = 500, connect_circle_dist: float = 50.0, search_until_max_iter: bool = True) Bases: :py:obj:`irsim.lib.path_planners.rrt_star.RRTStar` Informed RRT* path planner. After finding an initial feasible path the sampler switches from uniform random sampling to sampling inside an informed ellipsoidal set whose foci are the start and goal. This dramatically speeds up convergence towards the optimal path. Initialise the Informed RRT* planner. .. py:attribute:: Node .. py:method:: planning(start_pose: list[float], goal_pose: list[float], show_animation: bool = True) -> numpy.ndarray | None Informed RRT* path planning. :param start_pose: Start position ``[x, y]``. :param goal_pose: Goal position ``[x, y]``. :param show_animation: Render tree, ellipse and best path during planning. :returns: ``(2, N)`` waypoint array or *None*.