M-File Help: mstraj | View code for mstraj

# mstraj

Multi-segment multi-axis trajectory

traj = mstraj(p, qdmax, q0, dt, tacc, options) is a multi-segment trajectory (KxN) based on via points p (MxN) and axis velocity limits qdmax (1xN). The path comprises linear segments with polynomial blends. The output trajectory matrix has one row per time step, and one column per axis.

- P (MxN) is a matrix of via points, 1 row per via point, one column per axis. The last via point is the destination.
- QDMAX (1xN) are axis velocity limits which cannot be exceeded, or
- QDMAX (Mx1) are the durations for each of the M segments
- Q0 (1xN) are the initial axis coordinates
- DT is the time step
- TACC (1x1) this acceleration time is applied to all segment transitions
- TACC (1xM) acceleration time for each segment, TACC(i) is the acceleration time for the transition from segment i to segment i+1. TACC(1) is also the acceleration time at the start of segment 1.

traj = mstraj(segments, qdmax, q0, dt, tacc, qd0, qdf, options) as above but additionally specifies the initial and final axis velocities (1xN).

## Options

'verbose' | Show details.

## Notes

- If no output arguments are specified the trajectory is plotted.
- The path length K is a function of the number of via points, Q0, DT and TACC.
- The final via point P(M,:) is the destination.
- The motion has M segments from Q0 to P(1,:) to P(2,:) to P(M,:).
- All axes reach their via points at the same time.
- Can be used to create joint space trajectories where each axis is a joint coordinate.
- Can be used to create Cartesian trajectories with the "axes" assigned to translation and orientation in RPY or Euler angle form.

## See also

mstraj, lspb, ctraj

© 1990-2014 Peter Corke.