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 samplek (
int
) – number of nearest neighbors to connectnearest_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
- 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
- search_path_on_roadmap()
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: