Basic PRM For Rod

class discopygal.solvers.prm.prm_rod.BasicRodPRM(**kwargs)

Bases: PRM

The basic implementation of a Probabilistic Road Map (PRM) solver, modified for rod robot. Supports single-robot motion planning.

Points are tuples of (Point_2, FT) of position and angle, representing SE(2).

Parameters:
  • num_landmarks (int) – number of landmarks to sample

  • k (int) – number of nearest neighbors to connect

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

  • metric (Metric or None) – a metric for weighing edges, 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_roadmap()

Constructs the roadmap of points in the configuration space which a path will be searched on to find a solution. Every sampling solver should implement how to build the roadmap.

Returns:

The built roadmap. Each node represents a point in configuration space (dimension = 2*robots_num)

Return type:

nx.Graph

collision_free(p, q, clockwise)

Get two points in the configuration space and decide if they can be connected

point2vec3(point)

Convert a point (xy, theta) to a 3D vector

sample_free()

Sample a free random point