oxmpl 0.1.1

The Open Motion-Planning Library but Oxidised
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::base::{
    error::PlanningError, goal::Goal, problem_definition::ProblemDefinition, space::StateSpace,
    state::State, validity::StateValidityChecker,
};
use std::{sync::Arc, time::Duration};

#[derive(Clone)]
pub struct Path<S: State>(pub Vec<S>);

pub trait Planner<S: State, SP: StateSpace<StateType = S>, G: Goal<S>> {
    fn setup(
        &mut self,
        problem_def: Arc<ProblemDefinition<S, SP, G>>,
        validity_checker: Arc<dyn StateValidityChecker<S> + Send + Sync>,
    );
    fn solve(&mut self, timeout: Duration) -> Result<Path<S>, PlanningError>;
}