PRM
- class discopygal.solvers.prm.prm.PRM(num_landmarks, k_nn, **kwargs)
Bases:
SamplingSolver
The basic implementation of a Probabilistic Road Map (PRM) solver. Supports multi-robot motion planning, though might be inefficient for more than two-three robots.
- Parameters:
num_landmarks (
int
) – number of landmarks to samplek_nn (
int
) – number of nearest neighbors to connect (k nearest neighbors)nearest_neighbors (
NearestNeighbors
orNone
) – a nearest neighbors algorithm. if None then use sklearn implementationmetric (
Metric
orNone
) – a metric for weighing edges, can be different then the nearest_neighbors metric! If None then use euclidean metricsampler (
Sampler
) – sampling algorithm/method. if None then use uniform sampling
- build_roadmap()
Build a probabilistic roadmap for the robot in a given scene (sample random points and connect neighbors)
- Returns:
roadmap for the given scene
- 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