dRRT
- class discopygal.solvers.rrt.drrt.dRRT(num_landmarks, prm_num_landmarks, prm_k, nearest_neighbors=None, prm_nearest_neighbors=None, metric=None, sampler=None)
Bases:
Solver
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 roadmapprm_num_landmarks (
int
) – number of landmarks to sample in each robot’s PRMprm_k (
int
) – number of nearest neighbors to connect for PRMnearest_neighbors (
NearestNeighbors
orNone
) – a nearest neighbors algorithm for the tensor roadmap. if None then use sklearn implementationprm_nearest_neighbors (
NearestNeighbors
orNone
) – a nearest neighbors algorithm for the PRM. if None then use sklearn implementationmetric (
Metric
orNone
) – a metric for choosing best edge, can be different then the nearest_neighbors metric! If None then use euclidean metricsampler (
Sampler
) – sampling algorithm/method. if None then use uniform sampling
- static from_arguments(d)
Get a dictionary of arguments and return a solver. Should be overridded by solvers.
- Parameters:
d (
dict
) – arguments dict
- static 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
- get_graph()
Return a graph (if applicable). Can be overridded by solvers.
- Returns:
graph whose vertices are Point_2 or Point_d
- Return type:
networkx.Graph
orNone
- load_scene(scene)
Load a scene into the solver. Also build the tensor roadmap.
- Parameters:
scene (
Scene
) – scene to load
- solve()
Based on the start and end locations of each robot, solve the scene (i.e. return paths for all the robots)
- Returns:
path collection of motion planning
- Return type: