ctraj

RTSX Help: cartesian trajectory

ctraj

Compute cartesian trajectory between two points

Syntax

  • Ts = ctraj(T0, T1, t)

Input Arguments

  • T0, T1 — 4 x 4 homogeneous.transform matrix of the start and end frame, respectively
  • t — number of time steps, or time vector

Output Arguments

  • Ts — 4 x 4 x n cartesian trajectory

Description

traj( )computes cartesian trajectory between two coordinate frames T0 and T1. The n points trajectory follows a trapezoidal velocity profile (LSPB) along the path. The resulting cartesian trajectory is a 3-dimensional homogeneous transform matrix with the 3rd dimension being the point index; i.e., Ts(:, :, i) is the i’th point along the path. Argument t can be given as number of time steps n or a time vector.

Examples

T0 = transl([0.4, 0.2, 0])*trotx(pi);
T1 = transl([-0.4, -0.2, 0.3])*troty(pi/2)*trotz(-pi/2);
Ts = ctraj(T0, T1, 50);
tranimate(Ts);

See also

  • cpoly, qpoly, lspb — trajectory generation using cubic, quintic polynomials or linear-segment parabolic blend
  • mtraj, mstraj — multi-axis/multi-segment trajectory
  • jtraj — joint space trajectory