Skip to main content

ReachChecker

Struct ReachChecker 

Source
pub struct ReachChecker<R, const N: usize> { /* private fields */ }
Expand description

Checks states and motions of sampling-planning’s planners with reachable sets.

sampling-planning hands a checker only two bare states per motion, so this adapter assumes a fixed uncertainty tube: the real state at every tree node lies in the box state ± half_widths. It then proves each motion against that assumption:

  1. the model’s nominal steering from from toward to ends exactly at to;
  2. every set covering the motion, propagated from the box at from, is proven disjoint from every obstacle, at every intermediate time step;
  3. the end set is proven inside the box at to, so the assumption holds at the next node as well and edges chain soundly.

Only then is the motion Validity::Valid. Anything unproven is Validity::Unknown and rejected by the planners. For uncertainty that grows along a branch, use RobustRrt, which keeps the propagated set per node.

Implementations§

Source§

impl<R: Reach<N>, const N: usize> ReachChecker<R, N>

Source

pub fn new(obstacles: Obstacles, reach: R, half_widths: [f64; N]) -> Self

Creates a checker with the box state ± half_widths as the uncertainty at each node.

The split budget of obstacles also bounds the containment check of end sets.

§Panics

Panics if a half width is negative or not finite.

Source

pub const fn obstacles(&self) -> &Obstacles

The obstacles.

Source

pub const fn reach(&self) -> &R

The dynamics model.

Source

pub fn tube(&self, state: &[f64; N]) -> IntervalBox

The uncertainty box around state.

§Panics

Panics if state has a NaN coordinate.

Trait Implementations§

Source§

impl<R: Clone, const N: usize> Clone for ReachChecker<R, N>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<R: Debug, const N: usize> Debug for ReachChecker<R, N>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<R: Reach<N> + Steer<N, R::Control>, const N: usize> ValidityChecker<Euclidean<N>> for ReachChecker<R, N>

Source§

fn check_state(&self, state: &[f64; N]) -> Validity

Valid only if the uncertainty box around state is proven disjoint from every obstacle.

Source§

fn check_motion( &self, _: &Euclidean<N>, from: &[f64; N], to: &[f64; N], ) -> Validity

Valid only if the motion is proven safe and returns into the tube at to; see the type docs.

Auto Trait Implementations§

§

impl<R, const N: usize> Forget for ReachChecker<R, N>

§

impl<R, const N: usize> Freeze for ReachChecker<R, N>
where R: Freeze, [f64; N]: Freeze,

§

impl<R, const N: usize> Move for ReachChecker<R, N>

§

impl<R, const N: usize> RefUnwindSafe for ReachChecker<R, N>

§

impl<R, const N: usize> Send for ReachChecker<R, N>
where R: Send, [f64; N]: Send,

§

impl<R, const N: usize> Sync for ReachChecker<R, N>
where R: Sync, [f64; N]: Sync,

§

impl<R, const N: usize> Unpin for ReachChecker<R, N>
where R: Unpin, [f64; N]: Unpin,

§

impl<R, const N: usize> UnsafeUnpin for ReachChecker<R, N>
where R: UnsafeUnpin, [f64; N]: UnsafeUnpin,

§

impl<R, const N: usize> UnwindSafe for ReachChecker<R, N>
where R: UnwindSafe, [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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.