Skip to main content

RobustRrt

Struct RobustRrt 

Source
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>
where R: Reach<N> + Steer<N, R::Control>, Sa: Sampler<[f64; N]>, G: Goal<N>,

Source

pub fn new(problem: Problem<R, Sa, N, G>, config: Config) -> Result<Self, Error>

Checks the start set and plants the root.

§Errors
Source

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.

Source

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.

Source

pub fn nodes(&self) -> &[Node<R::Control, N>]

All tree nodes by id; node 0 is the root.

Source

pub const fn goal_node(&self) -> Option<usize>

The first node whose set was proven inside the goal region, if any.

Source

pub const fn problem(&self) -> &Problem<R, Sa, N, G>

The problem being solved.

Source

pub fn branch(&self, node: usize) -> Vec<usize>

The node ids from the root to node, inclusive.

§Panics

Panics if node is not a node id.

Source

pub fn path(&self) -> Option<Path<[f64; N]>>

The nominal path to the goal node, or None if the goal was not reached yet.

The cost is the Euclidean length of the nominal path.

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>
where Problem<R, Sa, N, G>: Freeze, Vec<Node<<R as Reach<N>>::Control, N>>: Freeze, LinearScan<[f64; N]>: Freeze,

§

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>
where Problem<R, Sa, N, G>: Send, Vec<Node<<R as Reach<N>>::Control, N>>: Send, LinearScan<[f64; N]>: Send,

§

impl<R, Sa, const N: usize, G> Sync for RobustRrt<R, Sa, N, G>
where Problem<R, Sa, N, G>: Sync, Vec<Node<<R as Reach<N>>::Control, N>>: Sync, LinearScan<[f64; N]>: Sync,

§

impl<R, Sa, const N: usize, G> Unpin for RobustRrt<R, Sa, N, G>
where Problem<R, Sa, N, G>: Unpin, Vec<Node<<R as Reach<N>>::Control, N>>: Unpin, LinearScan<[f64; N]>: Unpin,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.