Skip to main content

sampling_planning/
lib.rs

1//! # Sampling-based motion planning
2//!
3//! Motion planning with sampling-based planners: RRT, RRT*, PRM, FMT* and SST.
4//!
5//! This is a **motion planning** crate. It is named `sampling-planning` because the crate name `motion-planning` was already taken on crates.io.
6//!
7//! ## Planned scope
8//!
9//! - Tree expansion: RRT, RRT*, RRT#
10//! - Batch-informed: BIT*, AIT*, ABIT*, EIT*
11//! - Roadmaps: PRM, PRM*, SPARS, SPARS2
12//! - Fast marching: FMT*, BFMT*
13//! - Kinodynamic: SST, SST*, KPIECE
14//!
15//! ## Status
16//!
17//! Pre-release. Version 0.0.0 reserves the name; the API is not started yet and will change.
18//!
19//! Repository: <https://github.com/sunsided/sampling-planning>
20
21#![no_std]
22
23/// A continuous configuration space.
24pub trait StateSpace {
25    /// A configuration.
26    type State;
27
28    /// The distance between two configurations.
29    fn distance(&self, from: &Self::State, to: &Self::State) -> f64;
30
31    /// The configuration at fraction `t` in `[0, 1]` of the way from `from` to `to`.
32    fn interpolate(&self, from: &Self::State, to: &Self::State, t: f64) -> Self::State;
33}