Main Content

distance

Estimate cost of propagating to target state

    Description

    h = distance(mobileProp,q1,q2) estimates the cost of propagating from one state to another. The DistanceEstimator property of the state propagator defines the distance metric for approximating cost.

    Input Arguments

    collapse all

    Mobile robot state propagator, specified as a mobileRobotPropagator object.

    Initial states, specified as an n-by-s matrix. n is the number of states and s is the size of the state vector.

    Final states, specified as an n-by-s matrix. n is the number of states and s is the size of the state vector.

    Output Arguments

    collapse all

    Cost values, returned as an n-element vector. n is the number of q1 and q2 pairs.

    You can use the cost values returned by this function to find the nearest neighbor for sampled target states when planning a path.

    Introduced in R2021b