Multi-axis trajectory between two points
[Q,QD,QDD] = MTRAJ(TFUNC, Q0, QF, M) [Q,QD,QDD] = MTRAJ(TFUNC, Q0, QF, M,'plot')
[Q,QD,QDD] = MTRAJ(TFUNC, Q0, QF, M)
is a multi-axis trajectory (MxN) varying
from state Q0 (1xN) to QF (1xN) according to the scalar trajectory function
TFUNC in M steps. Joint velocity and acceleration can be optionally returned as
QD (MxN) and QDD (MxN) respectively. The trajectory outputs have one row per
time step, and one column per axis.
The shape of the trajectory is given by the scalar trajectory function TFUNC. Possible values of TFUNC are 'lspb' for a trapezoidal trajectory, or 'tpoly' for a polynomial trajectory.
[Q,QD,QDD] = MTRAJ(TFUNC, Q0, QF, T)
as above but specifies the trajectory
length in terms of the length of the time vector T (Mx1).
If no output arguments are specified Q, QD, and QDD are plotted.
When TFUNC is @tpoly the result is functionally equivalent to JTRAJ except that no initial velocities can be specified. JTRAJ is computationally a little more efficient.