M-File Help: mtraj | View code for mtraj |
Multi-axis trajectory between two points
[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
[S,SD,SDD] = TFUNC(S0, SF, M);
and possible values of tfunc include @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).
© 1990-2012 Peter Corke.