pub struct RobustRrt<R: Reach<N>, Sa, const N: usize, G = PolytopeGoal<N>> { /* private fields */ }Expand description
The Robust-RRT planner.
Every edge in the tree is proven safe over its whole duration, every intermediate time step included, from the reachable set of its parent. Runs are reproducible: all randomness comes from the caller’s RNG.
Implementations§
Source§impl<R, Sa, const N: usize, G> RobustRrt<R, Sa, N, G>
impl<R, Sa, const N: usize, G> RobustRrt<R, Sa, N, G>
Sourcepub fn new(problem: Problem<R, Sa, N, G>, config: Config) -> Result<Self, Error>
pub fn new(problem: Problem<R, Sa, N, G>, config: Config) -> Result<Self, Error>
Checks the start set and plants the root.
§Errors
Error::StartNotSafeif the start set is not proven disjoint from every obstacle.Error::GoalBiasOutOfRangeif the goal bias is not in[0, 1].
Sourcepub fn step<Rg: Rng + ?Sized>(&mut self, rng: &mut Rg) -> bool
pub fn step<Rg: Rng + ?Sized>(&mut self, rng: &mut Rg) -> bool
Runs one iteration. Returns whether a node was added.
§Panics
Panics if the model’s sets do not have the obstacles’ dimension.
Sourcepub fn solve<Rg: Rng + ?Sized>(
&mut self,
max_iterations: usize,
rng: &mut Rg,
) -> Option<Path<[f64; N]>>
pub fn solve<Rg: Rng + ?Sized>( &mut self, max_iterations: usize, rng: &mut Rg, ) -> Option<Path<[f64; N]>>
Runs until the goal is reached or at most max_iterations iterations.
Returns the path to the goal, or None if none was found within the budget.
Sourcepub const fn goal_node(&self) -> Option<usize>
pub const fn goal_node(&self) -> Option<usize>
The first node whose set was proven inside the goal region, if any.
Auto Trait Implementations§
impl<R, Sa, const N: usize, G> Forget for RobustRrt<R, Sa, N, G>
impl<R, Sa, const N: usize, G> Freeze for RobustRrt<R, Sa, N, G>
impl<R, Sa, const N: usize, G> Move for RobustRrt<R, Sa, N, G>
impl<R, Sa, const N: usize, G> RefUnwindSafe for RobustRrt<R, Sa, N, G>where
Problem<R, Sa, N, G>: RefUnwindSafe,
Vec<Node<<R as Reach<N>>::Control, N>>: RefUnwindSafe,
LinearScan<[f64; N]>: RefUnwindSafe,
impl<R, Sa, const N: usize, G> Send for RobustRrt<R, Sa, N, G>
impl<R, Sa, const N: usize, G> Sync for RobustRrt<R, Sa, N, G>
impl<R, Sa, const N: usize, G> Unpin for RobustRrt<R, Sa, N, G>
impl<R, Sa, const N: usize, G> UnsafeUnpin for RobustRrt<R, Sa, N, G>where
Problem<R, Sa, N, G>: UnsafeUnpin,
Vec<Node<<R as Reach<N>>::Control, N>>: UnsafeUnpin,
LinearScan<[f64; N]>: UnsafeUnpin,
impl<R, Sa, const N: usize, G> UnwindSafe for RobustRrt<R, Sa, N, G>where
Problem<R, Sa, N, G>: UnwindSafe,
Vec<Node<<R as Reach<N>>::Control, N>>: UnwindSafe,
LinearScan<[f64; N]>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.