cpoly

RTSX Help: trajectory generation

cpoly, cpolyplot

qpoly, qpolyplot

lspb, lspbplot

trajectory generation using cubic, quintic polynomials or linear-segment parabolic blend

Syntax

  • [s, sd, sdd] = cpoly(q0, qf, t, qd0, qdf)
  • [s, sd, sdd] = qpoly(q0, qf, t, qd0, qdf)
  • [s, sd, sdd] = lspb(q0, qf, t, v)

Remark: cpolyplot( ), qpolyplot( ), lspbplot( ) share the same syntax.

Input Arguments

  • q0, qf — start and end position, respectively
  • qd0, qdf — start and end velocity, respectively
  • t — number of time steps, or time vector
  • v — velocity of constant segment in LSPB trajectory

Output Arguments

  • s — generated trajectory array
  • sd — velocity array
  • sdd — acceleration array

Description

cpoly( ), qpoly( ), lspb( ) generate trajectory from q0 to qf using cubic, quintic polynomial, and linear segment with parabolic blend, respectively. The 3rd argument can be an integer (number of steps) or a time vector. Specifying start and end velocity is optional.

cpolyplot( ), qpolyplot( ), lspbplot( ) behaves similarly except that the resulting trajectory, velocity, and acceleration are also plotted.

Examples

[s, sd, sdd] = cpoly(0, 1, 50);  
s = qpoly(0, 1, 50, 0.5, 0);
s = lspbplot(0, 1, 50, 0.035);

See also