pub struct ReedsShepp { /* private fields */ }Expand description
The Reeds-Shepp car: SE(2) poses (Se2State) of a vehicle that drives forward or
backward at unit speed with a minimum turning radius.
StateSpace::distance is the length of the shortest Reeds-Shepp path, a true metric
(symmetric, triangle inequality), and StateSpace::interpolate follows that path.
Ported from OMPL’s ReedsSheppStateSpace (Mark Moll), which evaluates the formulas 8.1 to
8.11 of Reeds and Shepp with the paper’s typos fixed, each under time flip, reflection and
backward symmetries. ReedsShepp::candidates lists all of those words.
StraightLine steering works as is, as for
Dubins.
§Examples
use sampling_planning::{ReedsShepp, Se2State, StateSpace};
let car = ReedsShepp::new(1.0);
let back = car.distance(&Se2State::new(0.0, 0.0, 0.0), &Se2State::new(-3.0, 0.0, 0.0));
assert!((back - 3.0).abs() < 1e-9, "reversing three units");Implementations§
Source§impl ReedsShepp
impl ReedsShepp
Sourcepub fn new(radius: f64) -> Self
pub fn new(radius: f64) -> Self
The Reeds-Shepp car with the given minimum turning radius.
§Panics
Panics if radius is not positive and finite.
Sourcepub fn path(&self, from: &Se2State, to: &Se2State) -> ReedsSheppPath
pub fn path(&self, from: &Se2State, to: &Se2State) -> ReedsSheppPath
The shortest Reeds-Shepp path from from to to; the earliest candidate on ties.
§Panics
Never for finite poses: one of the CSC words always has a solution. Non-finite poses panic.
Sourcepub fn candidates(&self, from: &Se2State, to: &Se2State) -> Vec<ReedsSheppPath>
pub fn candidates(&self, from: &Se2State, to: &Se2State) -> Vec<ReedsSheppPath>
Every feasible candidate from from to to in the order they are evaluated, for
inspection and testing. ReedsShepp::path picks the shortest of them.
Trait Implementations§
Source§impl Clone for ReedsShepp
impl Clone for ReedsShepp
impl Copy for ReedsShepp
Source§impl Debug for ReedsShepp
impl Debug for ReedsShepp
Source§impl PartialEq for ReedsShepp
impl PartialEq for ReedsShepp
Source§impl StateSpace for ReedsShepp
impl StateSpace for ReedsShepp
Source§fn dimension(&self) -> usize
fn dimension(&self) -> usize
Source§fn distance(&self, from: &Se2State, to: &Se2State) -> f64
fn distance(&self, from: &Se2State, to: &Se2State) -> f64
Source§fn is_euclidean(&self) -> bool
fn is_euclidean(&self) -> bool
StateSpace::distance is the Euclidean norm of
their difference and StateSpace::interpolate the straight line. Read more