pub struct So2;Expand description
The space of planar orientations: angles in radians, identified modulo 2 pi.
The distance is the length of the shorter arc, at most pi; interpolation turns along that
arc. States may be any finite angle; results of StateSpace::interpolate are wrapped
into [-pi, pi), except that t = 0 and t = 1 return the endpoints verbatim.
§Examples
use sampling_planning::{So2, StateSpace};
let (a, b) = (3.0, -3.0);
assert!((So2.distance(&a, &b) - (2.0 * std::f64::consts::PI - 6.0)).abs() < 1e-12);Trait Implementations§
impl Copy for So2
impl Eq for So2
Source§impl StateSpace for So2
impl StateSpace for So2
Source§fn dimension(&self) -> usize
fn dimension(&self) -> usize
The number of degrees of freedom; feeds the RRT*/PRM* connection radius.
Source§fn distance(&self, from: &f64, to: &f64) -> f64
fn distance(&self, from: &f64, to: &f64) -> f64
The distance between two configurations. Read more
Source§fn is_euclidean(&self) -> bool
fn is_euclidean(&self) -> bool
Whether states are coordinate vectors,
StateSpace::distance is the Euclidean norm of
their difference and StateSpace::interpolate the straight line. Read moreimpl StructuralPartialEq for So2
Auto Trait Implementations§
impl Forget for So2
impl Freeze for So2
impl Move for So2
impl RefUnwindSafe for So2
impl Send for So2
impl Sync for So2
impl Unpin for So2
impl UnsafeUnpin for So2
impl UnwindSafe for So2
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