pub struct PrmConfig {
pub connection: Connection,
pub lazy: bool,
pub check_both_directions: bool,
}Expand description
Settings for Prm.
Fields§
§connection: ConnectionThe neighbor rule for new nodes and for query endpoints.
k-nearest rules connect a new node to its k nearest older nodes; an older node gains
edges only when it is among the k nearest of a newer one, so degrees differ.
lazy: boolLazy PRM (Bohlin and Kavraki 2000): store edges unchecked and check only the edges of candidate shortest paths at query time, dropping invalid ones and searching again.
Nodes are still state-checked when they are added. Off by default.
check_both_directions: boolCheck every roadmap edge in both directions.
Roadmap edges are traveled both ways, but checked once, from the older to the newer node.
That is sound only for a symmetric ValidityChecker::check_motion; switch this on for
directional checkers (reachable sets, one-way constraints). Query edges from the start
and to the goal are always checked in travel direction only. Off by default.
Implementations§
Source§impl PrmConfig
impl PrmConfig
Sourcepub const fn fixed(radius: f64) -> Self
pub const fn fixed(radius: f64) -> Self
Classic PRM with a fixed connection radius, eager checks.
Sourcepub const fn star_k(k_constant: f64) -> Self
pub const fn star_k(k_constant: f64) -> Self
k-nearest PRM* with the neighbor count constant k_constant, eager checks.
Sourcepub fn k_constant_lower_bound(dimension: usize) -> f64
pub fn k_constant_lower_bound(dimension: usize) -> f64
The smallest k-nearest constant for which k-nearest PRM* is asymptotically optimal
(Karaman and Frazzoli 2011, Theorem 35): e (1 + 1/d).
Sourcepub fn gamma_lower_bound(dimension: usize, free_volume: f64) -> f64
pub fn gamma_lower_bound(dimension: usize, free_volume: f64) -> f64
The smallest gamma for which PRM* is asymptotically optimal (Karaman and Frazzoli
2011, Theorem 34): 2 (1 + 1/d)^(1/d) (free_volume / zeta_d)^(1/d), where zeta_d is the
volume of the unit d-ball.
free_volume is the Lebesgue measure of the obstacle-free space; the volume of the
sampling box is a safe over-estimate. Pick gamma somewhat above this value.