Main Content

sampleControl

Generate control command and duration

Since R2021b

    Description

    [u,steps] = sampleControl(mobileProp,q0,u0,qTgt) generates a series of control commands and number of steps to move from the current state q0 with control command u0 toward the target state qTgt.

    Input Arguments

    collapse all

    Mobile robot state propagator, specified as a mobileRobotPropagator object.

    Initial state of the system, specified as an s-element vector. s is the number of state variables in the state space.

    Initial control input, specified as an c-element vector. c is the number of control inputs.

    Target state of the system, specified as an s-element vector. s is the number of state variables in the state space.

    Output Arguments

    collapse all

    Control inputs for propagating states, returned as an c-element vector. c is the number of control inputs.

    Number of steps from each state and control input to next, returned as an n-element vector of positive integers.

    Version History

    Introduced in R2021b