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 configuration 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 T (Mx1) is a time vector which dictates the number of points on the trajectory.
© 1990-2014 Peter Corke.