pub trait CSpace<X, const N: usize>: FromParams + Sized {
type Traj: Trajectory<X, N>;
// Required methods
fn volume(&self) -> X;
fn cost<R1, R2, S1, S2>(
&self,
start: &Vector<X, R1, S1>,
end: &Vector<X, R2, S2>,
) -> X
where X: SimdRealField,
R1: Dim,
R2: Dim,
S1: Storage<X, R1>,
S2: Storage<X, R2>,
ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfRows<R1, Const<N>> + SameNumberOfRows<R2, Const<N>>;
fn trajectory<S1, S2>(
&self,
start: Vector<X, Const<N>, S1>,
end: Vector<X, Const<N>, S2>,
) -> Option<FullTraj<X, Self::Traj, S1, S2, N>>
where X: Scalar,
S1: Storage<X, Const<N>>,
S2: Storage<X, Const<N>>;
fn is_free<S>(&self, state: &Vector<X, Const<N>, S>) -> bool
where S: Storage<X, Const<N>>;
fn saturate(&self, a: &mut SVector<X, N>, b: &SVector<X, N>, delta: X);
fn sample(&mut self) -> SVector<X, N>;
}Expand description
A generic configuration space for sampling-based problems
Descibes the state space of the system that a path is being planned for
Required Associated Types§
type Traj: Trajectory<X, N>
Required Methods§
Sourcefn cost<R1, R2, S1, S2>(
&self,
start: &Vector<X, R1, S1>,
end: &Vector<X, R2, S2>,
) -> Xwhere
X: SimdRealField,
R1: Dim,
R2: Dim,
S1: Storage<X, R1>,
S2: Storage<X, R2>,
ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfRows<R1, Const<N>> + SameNumberOfRows<R2, Const<N>>,
fn cost<R1, R2, S1, S2>(
&self,
start: &Vector<X, R1, S1>,
end: &Vector<X, R2, S2>,
) -> Xwhere
X: SimdRealField,
R1: Dim,
R2: Dim,
S1: Storage<X, R1>,
S2: Storage<X, R2>,
ShapeConstraint: SameNumberOfRows<R1, R2> + SameNumberOfRows<R1, Const<N>> + SameNumberOfRows<R2, Const<N>>,
Cost function between two arbitrary points within the space Always returns a value
Must satisfy the triangle inequality
Sourcefn trajectory<S1, S2>(
&self,
start: Vector<X, Const<N>, S1>,
end: Vector<X, Const<N>, S2>,
) -> Option<FullTraj<X, Self::Traj, S1, S2, N>>
fn trajectory<S1, S2>( &self, start: Vector<X, Const<N>, S1>, end: Vector<X, Const<N>, S2>, ) -> Option<FullTraj<X, Self::Traj, S1, S2, N>>
Calculate the trajectory data between the given start and end points for the system
Returns None if trajectory isn’t possible due to system dynamics
Sourcefn is_free<S>(&self, state: &Vector<X, Const<N>, S>) -> bool
fn is_free<S>(&self, state: &Vector<X, Const<N>, S>) -> bool
Determines if the given point is a valid state in the space
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.