gennav.planners.prm package¶
Submodules¶
gennav.planners.prm.prm module¶
-
class
gennav.planners.prm.prm.PRM(sampler, r, n, *args, **kwargs)¶ Bases:
gennav.planners.base.PlannerPRM Class.
Parameters: - sampler (gennav.utils.sampler.Sampler) – sampler to get random states
- r (float) – maximum radius to look for neighbours
- n (int) – total no. of nodes to be sampled in sample_area
-
construct(env)¶ Constructs PRM graph.
Parameters: env (gennav.envs.Environment) – Base class for an envrionment. Returns: - A dict where the keys correspond to nodes and
- the values for each key is a list of the neighbour nodes
Return type: graph (gennav.utils.graph)
-
plan(start, goal, env)¶ Constructs a graph avoiding obstacles and then plans path from start to goal within the graph. :param start: tuple with start point coordinates. :type start: gennav.utils.RobotState :param goal: tuple with end point coordinates. :type goal: gennav.utils.RobotState :param env: Base class for an envrionment. :type env: gennav.envs.Environment
Returns: The planned path as trajectory dict: Dictionary containing additional information Return type: gennav.utils.Trajectory
-
replan(start, goal, env)¶ Constructs a graph avoiding obstacles and then replans path from start to goal within the graph. :param start: tuple with start point coordinates. :type start: gennav.utils.RobotState :param goal: tuple with end point coordinates. :type goal: gennav.utils.RobotState :param env: Base class for an envrionment. :type env: gennav.envs.Environment
Returns: The planned path as trajectory dict: Dictionary containing additional information Return type: gennav.utils.Trajectory
gennav.planners.prm.prmstar module¶
-
class
gennav.planners.prm.prmstar.PRMStar(sampler, c, n, *args, **kwargs)¶ Bases:
gennav.planners.base.PlannerPRM-Star Class. :param sampler: sampler to get random states :type sampler: gennav.utils.sampler.Sampler :param c: a constant for radius determination :type c: float :param n: total no. of nodes to be sampled in sample_area :type n: int
-
construct(env)¶ Constructs PRM-Star graph. :param env: Base class for an envrionment. :type env: gennav.envs.Environment
Returns: - A dict where the keys correspond to nodes and
- the values for each key is a list of the neighbour nodes
Return type: graph (dict)
-
plan(start, goal, env)¶ Constructs a graph avoiding obstacles and then plans path from start to goal within the graph. :param start: tuple with start point coordinates. :type start: gennav.utils.RobotState :param goal: tuple with end point coordinates. :type goal: gennav.utils.RobotState :param env: Base class for an envrionment. :type env: gennav.envs.Environment
Returns: The planned path as trajectory dict: Dictionary containing additional information Return type: gennav.utils.Trajectory
-
replan(start, goal, env)¶ Constructs a graph avoiding obstacles and then replans path from start to goal within the graph. :param start: tuple with start point coordinates. :type start: gennav.utils.RobotState :param goal: tuple with end point coordinates. :type goal: gennav.utils.RobotState :param env: Base class for an envrionment. :type env: gennav.envs.Environment
Returns: The planned path as trajectory dict: Dictionary containing additional information Return type: gennav.utils.Trajectory
-