moonbitstack/moonmcl/planning does not have a README file

    Dubins

    pub(all) struct Dubins {
    turning_radius : Double
    extent : Double
    } derive(
    Debug
    )

    A Dubins car.

    Dubins::distance

    Dubins::new

    fn Dubins::new(turning_radius~ : Double, extent? : Double) -> Dubins raise
    Refused

    A Dubins car with the given radius. extent is the half width of the box the space samples from.

    Dubins::path

    The shortest Dubins path between two (x, y, heading) poses.

    Dubins::paths

    Every word that joins the two poses, in word order.

    A car whose words are all drawn is a car the reader can compare; the callers that only want to drive one take path.

    Dubins::to_repr

    DubinsPath

    pub(all) struct DubinsPath {
    word : DubinsWord
    lengths : (Double, Double, Double)
    length : Double
    origin :
    Vec

    radius : Double
    } derive(
    Debug
    )

    The Dubins path between two poses: the word and the length of each of its three pieces.

    DubinsPath::at

    fn DubinsPath::at(self : DubinsPath, distance : Double) ->
    Vec

    The pose at distance travelled along the path.

    DubinsWord

    pub(all) enum DubinsWord {
    Lsl
    Lsr
    Rsl
    Rsr
    Rlr
    Lrl
    } derive(
    Debug
    )

    One of the six Dubins words: three pieces, each a left arc, a right arc or a straight line.

    DynamicWindow

    pub(all) struct DynamicWindow {
    max_velocity : Double
    min_velocity : Double
    max_rotation : Double
    max_acceleration : Double
    max_rotation_acceleration : Double
    resolution_velocity : Double
    resolution_rotation : Double
    predict : Double
    clearance : Double
    margin : Double
    heading_weight : Double
    clearance_weight : Double
    velocity_weight : Double
    } derive(
    Debug
    )

    The dynamic window approach: sample the velocities the drives can reach in one period, roll each one forward, and keep the best by heading, clearance and speed.

    DynamicWindow::command

    The best velocity pair for the current pose towards goal, avoiding obstacles, which are points.

    GridSearch

    pub(all) enum GridSearch {
    Dijkstra
    AStar
    Jps
    ThetaStar
    } derive(
    Debug
    )

    Which search a grid query runs.

    GridSpace

    pub(all) struct GridSpace {
    grid :
    Grid

    resolution : Double
    }

    A grid used as a planning space, so a sampling planner can search a lattice.

    GridSpace::distance

    GridSpace::new

    A space whose states are grid cells scaled by resolution.

    GridSpace::valid

    InformedRrtStar

    pub(all) struct InformedRrtStar {
    space : &
    Space

    validity : &
    Validity

    step : Double
    goal_bias : Double
    neighbourhood : Double
    rng : &
    Rng

    }

    An RRT* that only samples where a path shorter than the best one could still run: the ellipse whose foci are the start and the goal.

    InformedRrtStar::new

    fn InformedRrtStar::new(space~ : &
    Space
    , validity~ : &
    Validity
    , step? : Double, goal_bias? : Double, neighbourhood? : Double, seed? : Int) -> InformedRrtStar raise
    Refused

    An informed RRT* seeded from the best path found so far.

    PotentialField

    pub(all) struct PotentialField {
    attraction : Double
    repulsion : Double
    influence : Double
    step : Double
    } derive(
    Debug
    )

    An artificial potential field: attraction to the goal, repulsion from the obstacles.

    PotentialField::command

    The velocity command for this step, as a two-dimensional motion.

    ReedsShepp

    pub(all) struct ReedsShepp {
    turning_radius : Double
    extent : Double
    } derive(
    Debug
    )

    A Reeds-Shepp car.

    ReedsShepp::candidates

    Every word that joins the two poses, shortest first.

    A word that cannot reach the goal returns no parameters at all, so the list holds only the ones that do; the shortest of them shares its length with any other candidate of the same total.

    ReedsShepp::distance

    ReedsShepp::new

    fn ReedsShepp::new(turning_radius~ : Double, extent? : Double) -> ReedsShepp raise
    Refused

    A Reeds-Shepp car with the given radius. extent is the half width of the box the space samples from.

    ReedsShepp::path

    The shortest path between two (x, y, heading) poses, reversing as needed.

    ReedsSheppPath

    pub(all) struct ReedsSheppPath {
    word : ReedsSheppWord
    segments : Array[ReedsSheppSegment]
    length : Double
    origin :
    Vec

    radius : Double
    } derive(
    Debug
    )

    A Reeds-Shepp path: the word it spells, its pieces, and the pose it starts from.

    ReedsSheppPath::at

    The pose at distance travelled along the path: an arc turns around its own centre, a straight runs along the heading, and backing up moves the car the other way without changing which way it faces.

    ReedsSheppPath::cusps

    fn ReedsSheppPath::cusps(self : ReedsSheppPath) -> Int

    How many times the path changes direction.

    ReedsSheppSegment

    pub(all) struct ReedsSheppSegment {
    turn : Double
    forward : Double
    length : Double
    } derive(
    Debug
    )

    One straight or curved piece of a Reeds-Shepp path.

    ReedsSheppWord

    pub(all) enum ReedsSheppWord {
    LpSpLp
    RpSpRp
    LmSmLm
    RmSmRm
    LpSpRp
    RpSpLp
    LmSmRm
    RmSmLm
    LpRmLp
    RpLmRp
    LmRpLm
    RmLpRm
    LpRmLm
    RpLmRm
    LmRpLp
    RmLpRp
    LpRpLm
    RpLpRm
    LmRmLp
    RmRmLp
    LpRpLmRm
    RpLpRmLm
    LmRmLpRp
    RmRmLpLp
    LpRmLmRp
    RpLmRmLp
    LmRpLpRm
    RmLpRpLm
    LpRmSmLm
    RpLmSmRm
    LmRpSpLp
    RmLpSpRp
    LpRmSmRm
    RpLmSmLm
    LmRpSpRp
    RmLpSpLp
    LpSpRmLm
    RpSpLmRm
    LmSmRpLp
    RmSmLpRp
    LpSpLpRm
    RpSpRpLm
    LmSmLmRp
    RmSmRmLp
    LpRmSmLmRp
    RpLmSmRmLp
    LmRpSpLpRm
    RmLpSpRpLm
    } derive(
    Debug
    )

    One of the forty-eight reversable-car path words.

    ReedsSheppWord::code

    fn ReedsSheppWord::code(self : ReedsSheppWord) -> Int

    The position of a word in the enumeration: family times four plus variant.

    A family is one set of segment formulas and a variant is one of the four frames it is applied in, so the pair is all the table a word needs.

    ReedsSheppWord::of_code

    fn ReedsSheppWord::of_code(code : Int) -> ReedsSheppWord?

    The word a code names, or None outside the forty-eight.

    Rrt

    pub(all) struct Rrt {
    space : &
    Space

    validity : &
    Validity

    step : Double
    goal_bias : Double
    rng : &
    Rng

    }

    A rapidly-exploring random tree.

    step is the length of the edge a new sample is allowed to reach, and goal_bias the chance that a sample is the goal itself rather than a random state. The generator is seeded from the planner, so a run replays exactly.

    Rrt::new

    fn Rrt::new(space~ : &
    Space
    , validity~ : &
    Validity
    , step? : Double, goal_bias? : Double, seed? : Int) -> Rrt raise
    Refused

    An RRT that extends by step and steers to the goal once every 1 / goal_bias samples.

    RrtStar

    pub(all) struct RrtStar {
    space : &
    Space

    validity : &
    Validity

    step : Double
    goal_bias : Double
    neighbourhood : Double
    rng : &
    Rng

    }

    An RRT that rewires the tree as it grows, so the path converges on the shortest one inside the budget.

    RrtStar::new

    fn RrtStar::new(space~ : &
    Space
    , validity~ : &
    Validity
    , step? : Double, goal_bias? : Double, neighbourhood? : Double, seed? : Int) -> RrtStar raise
    Refused

    An RRT* with a rewiring radius.

    dynamic_window

    let dynamic_window : DynamicWindow

    The preset dynamic window: a metre per second, two radians per second, and a prediction of a second and a half.

    family_words

    fn family_words(family : Int) -> Array[ReedsSheppWord]

    The words of the family family, in variant order.

    grid_path

    fn grid_path(grid :
    Grid
    , start~ : Int, goal~ : Int, search? : GridSearch) -> Array[Int] raise
    Refused

    The shortest path between two grid cells, as node indices, from the grid package's own search.

    potential_field

    let potential_field : PotentialField

    The preset potential field.