robotics_toolbox.planning.prm.PRM

class robotics_toolbox.planning.prm.PRM(robot, delta_q=0.2)

Bases: object

Parameters:

robot (RobotBase)

__init__(robot, delta_q=0.2)

PRM planner for a given robot. :param robot: robot used to sample configuration and check collisions :param delta_q: maximum distance between two configurations when building path

Parameters:

robot (RobotBase)

Return type:

None

Methods

__init__(robot[, delta_q])

PRM planner for a given robot.

closest_connect(q[, q_to_graph])

connect the closest node to the given configuration

connect(q_init, q_goal[, max_iter])

will find path between two given configurations

explore([max_nodes])

PRM algorithm for motion planning.

plan(q_start, q_goal[, graph_planner])

will plan path in the current graph

closest_connect(q, q_to_graph=True)

connect the closest node to the given configuration

return: path from the given config to the closest reachable node and closest reacheble node id

Parameters:
  • q (ArrayLike | SE2 | SE3)

  • q_to_graph (bool)

connect(q_init, q_goal, max_iter=1000)

will find path between two given configurations

Parameters:
  • q_init (ArrayLike | SE2 | SE3)

  • q_goal (ArrayLike | SE2 | SE3)

  • max_iter (int)

Return type:

list[ArrayLike | SE2 | SE3] | None

explore(max_nodes=500)

PRM algorithm for motion planning.

Parameters:

max_nodes (int)

Return type:

None

plan(q_start, q_goal, graph_planner=<class 'robotics_toolbox.planning.prm.GraphPlanner'>)

will plan path in the current graph

Parameters:
Return type:

list[ArrayLike | SE2 | SE3]