The PRM algorithm generates a roadmap of reachable locations using the following three parameters:
1.Number of samples — The map consists of a number of randomly placed locations (samples) throughout the robot's reachable workspace. This number determines the number of samples. The default is 100 samples.
2.Edges per sample — The algorithm attempts to connect every sample in the map with a number of other samples. The line which connects two samples together is called an "edge" and indicates a collision-free path between those two locations. This property indicates the maximum number of edges that will be created per sample. The default is 25 edges per sample.
3.Robot step (deg) — When checking if a potential edge is collision-free, the algorithm will stop at regular intervals along it to check for collisions. The distance between these intervals is determined by the robot step. The default is 4 degrees.
These three parameters determine how detailed the generated roadmap will be. They also affect how long it takes to generate the roadmap during the construction phase.
A larger Number of samples and more Edges per sample will produce a finer-grained roadmap which will take longer to generate. A larger Robot step will generate a map quicker but may fail to detect potential collisions.
Using the default values, a roadmap can usually be generated within 15 minutes, depending on the setup of the workspace and properties of the robot.
See the tips at the end of this section for best practices when setting these parameters.