pub struct SRobotPath<const N: usize> { /* private fields */ }Expand description
Statically-sized robot path backed by Vec<SRobotQ<N>>.
SRobotPath is guranteed to have at least 2 waypoints, so it always has a defined start and end configuration.
Implementations§
Source§impl<const N: usize> SRobotPath<N>
impl<const N: usize> SRobotPath<N>
pub fn new(waypoints: Vec<SRobotQ<N>>) -> DekeResult<Self>
pub fn new_prechecked( first: SRobotQ<N>, last: SRobotQ<N>, middle: Vec<SRobotQ<N>>, ) -> Self
pub fn from_two(start: SRobotQ<N>, goal: SRobotQ<N>) -> Self
pub fn len(&self) -> usize
pub fn get(&self, index: usize) -> Option<&SRobotQ<N>>
pub fn first(&self) -> &SRobotQ<N>
pub fn last(&self) -> &SRobotQ<N>
pub fn iter(&self) -> Iter<'_, SRobotQ<N>>
pub fn iter_mut(&mut self) -> IterMut<'_, SRobotQ<N>>
pub fn segments(&self) -> impl Iterator<Item = (&SRobotQ<N>, &SRobotQ<N>)>
pub fn push(&mut self, q: SRobotQ<N>)
pub fn pop(&mut self) -> Option<SRobotQ<N>>
pub fn truncate(&mut self, len: usize)
pub fn reverse(&mut self)
pub fn reversed(&self) -> Self
pub fn arc_length(&self) -> f32
pub fn segment_lengths(&self) -> Vec<f32>
pub fn cumulative_lengths(&self) -> Vec<f32>
pub fn max_segment_length(&self) -> f32
pub fn max_joint_step(&self) -> f32
pub fn sample(&self, t: f32) -> Option<SRobotQ<N>>
pub fn densify(&self, max_dist: f32) -> Self
pub fn simplify(&self, tol: f32) -> Self
pub fn to_robot_path(&self) -> RobotPath
Trait Implementations§
Source§impl<const N: usize> Clone for SRobotPath<N>
impl<const N: usize> Clone for SRobotPath<N>
Source§fn clone(&self) -> SRobotPath<N>
fn clone(&self) -> SRobotPath<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize> Debug for SRobotPath<N>
impl<const N: usize> Debug for SRobotPath<N>
Source§impl<const N: usize> From<&SRobotPath<N>> for RobotPath
impl<const N: usize> From<&SRobotPath<N>> for RobotPath
Source§fn from(sp: &SRobotPath<N>) -> Self
fn from(sp: &SRobotPath<N>) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> From<SRobotPath<N>> for RobotPath
impl<const N: usize> From<SRobotPath<N>> for RobotPath
Source§fn from(sp: SRobotPath<N>) -> Self
fn from(sp: SRobotPath<N>) -> Self
Converts to this type from the input type.
Source§impl<'a, const N: usize> IntoIterator for &'a SRobotPath<N>
impl<'a, const N: usize> IntoIterator for &'a SRobotPath<N>
Source§impl<const N: usize> IntoIterator for SRobotPath<N>
impl<const N: usize> IntoIterator for SRobotPath<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for SRobotPath<N>
impl<const N: usize> RefUnwindSafe for SRobotPath<N>
impl<const N: usize> Send for SRobotPath<N>
impl<const N: usize> Sync for SRobotPath<N>
impl<const N: usize> Unpin for SRobotPath<N>
impl<const N: usize> UnsafeUnpin for SRobotPath<N>
impl<const N: usize> UnwindSafe for SRobotPath<N>
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