dRRT

class discopygal.solvers.rrt.drrt.dRRT(num_landmarks, k_nn, prm_num_landmarks=0, prm_nearest_neighbors=None, **kwargs)

Bases: TensorSolver

Implementation of the dRRT algorithm for multi-robot motion planning. This is done by generating PRMs for each robot seperatly, and then running RRT where we only add valid vertices and edges in the tensor roadmap generated by the tensor product of the individual roadmaps.

Parameters:
  • num_landmarks (int) – number of landmarks to sample in the tensor roadmap

  • prm_num_landmarks (int) – number of landmarks to sample in each robot’s PRM

  • k_nn (int) – number of nearest neighbors to connect for PRM

  • nearest_neighbors (NearestNeighbors or None) – a nearest neighbors algorithm for the tensor roadmap. if None then use sklearn implementation

  • prm_nearest_neighbors (NearestNeighbors or None) – a nearest neighbors algorithm for the PRM. if None then use sklearn implementation

  • metric (Metric or None) – a metric for choosing best edge, can be different then the nearest_neighbors metric! If None then use euclidean metric

  • sampler (Sampler) – sampling algorithm/method. if None then use uniform sampling

build_robot_roadmap(robot)

Creates a two-dimensional roadmap for the given robot

Parameters:

robot (Robot) – The robot o build a roadmap for

Returns:

The roadmap

Return type:

Roadmap

classmethod get_arguments()

Return a list of arguments and their description, defaults and types. Can be used by a GUI to generate fields dynamically. Should be overridded by solvers.

Returns:

arguments dict

Return type:

dict

search_tensor_roadmap()

Implement dRRT search on tensor roadmap Searches on tensor roadmap until finds a path

Parameters:
  • tensor_roadmap (TensorRoadmap) – Tensor roadmap to search on for path

  • num_landmarks (int) – Number of landmarks to sample during the dRRT search

  • k_nearest_neighbors (int) – Number of nearest neighbors to check for connection

  • sampler (function) – The sampler to use to sample landmarks

  • log – Logging function to use. For example discopygal.solvers.Solver.Solver.log()