Skip to main content

InterpolationMode

Enum InterpolationMode 

Source
pub enum InterpolationMode<'a> {
    UniformTimeGrid(f64, f64, bool),
    NonUniformTimeGrid(&'a [f64]),
}
Expand description

Time-grid interpolation policy used when converting trajectory profiles to time-domain samples.

Import via use copp::InterpolationMode;; this is the single canonical path. All solver submodules (solver::topp2_ra, solver::topp3_lp, etc.) accept this type in their interpolation helpers (t_to_s_topp2, t_to_s_topp3, etc.). Time-grid policy used when interpolating path-parameterization outputs.

This enum describes how target sample times are provided to interpolation routines after a trajectory has been parameterized.

§Output behavior

Interpolation helpers such as t_to_s_topp2 and t_to_s_topp3 preserve the requested sampling policy:

  • UniformTimeGrid emits samples t0 + i * dt up to the final time, and may append the exact final sample when include_final is true.
  • NonUniformTimeGrid returns one output value per caller-provided time stamp.
  • Samples outside the computed trajectory time range are reported as NaN by the interpolation helpers.

Variants§

§

UniformTimeGrid(f64, f64, bool)

Uniform sampling grid.

§Tuple fields

  • t0: time stamp of the first path station (s[0]).
  • dt: constant sampling period (dt > 0 expected by callers).
  • include_final: handling of non-integer final step.

§Final-sample policy

If final time t_final is not an integer multiple of dt from t0:

  • include_final = true: append one final sample exactly at t_final.
  • include_final = false: stop at t0 + n\,dt, where n is the largest integer satisfying t0 + n\,dt \le t_final.
§

NonUniformTimeGrid(&'a [f64])

User-provided non-uniform sampling grid.

§Tuple fields

  • t_samples: strictly increasing time stamps.

§Contract

Callers should provide an increasing grid and ensure the first sample is not earlier than the interpolation start time.

Auto Trait Implementations§

§

impl<'a> Freeze for InterpolationMode<'a>

§

impl<'a> RefUnwindSafe for InterpolationMode<'a>

§

impl<'a> Send for InterpolationMode<'a>

§

impl<'a> Sync for InterpolationMode<'a>

§

impl<'a> Unpin for InterpolationMode<'a>

§

impl<'a> UnwindSafe for InterpolationMode<'a>

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

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

§

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

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

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

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

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.