Last update : April 2007
rt_transl - set or extract the translational component of a homogeneous transform[view code]
- T = rt_transl(x, y, z)
- T = rt_transl(v)
- v = rt_transl(T)
- XZY = rt_transl(TC)
: scalar. It represents the X-axis component of the translation vector, with respect to a basic reference frame.
: scalar. It represents the Y-axis component of the translation vector, with respect to a basic reference frame.
: scalar. It represents the Z-axis component of the translation vector, with respect to a basic reference frame.
: 3-element vector. Depending from which call has been executed, it can represent the translation (row or column) vector generating the homogeneous transform T, or the (column vector) translational component extracted from the homogeneous transform T. In both cases, it is expressed with respect to a basic reference frame.
: 4-by-4 matrix. Depending from which call has been executed, it can represent the homogeneous transform resulting from the translation transformation, or the homogeneous transform from which we want to extract the translational component.
: 4-by-4-by-m hypermatrix (m is arbitrary). A Cartesian trajectory matrix.
: m-by-3 matrix. Its columns i.e. XYZ(:,1), XYZ(:,2) and XYZ(:,3) are formed, respectively, by appropriately stacking the x, y and z components of translational component of the Cartesian trajectory matrix TC.
The first two forms return a homogeneous transformation representing a translation expressed as three scalar x, y and z, or a Cartesian vector v.
The third form returns the translational part of a homogeneous transform as a 3-element column vector.
The fourth form returns a matrix whose columns are the X, Y, and Z columns of the 4-by-4-by-m Cartesian trajectory matrix TC.
// A pure translation of 0.5m in the X direction:
T = rt_transl(0.5, 0, 0);
// Extract the translational part of T
p = rt_transl(T);
// Generate a Cartesian trajectory between T0 and T1
T0 = rt_transl(0, 0, 0);
T1 = rt_transl([-1 2 1]);
t = 0:0.056:10;
r = rt_jtraj(0, 1, t);
TC = rt_ctraj(T0, T1, r);
// Extract the translational part from Cartesian trajectory
XYZ = rt_transl(TC);
rt_ctraj, rt_rotx, rt_roty, rt_rotz, rt_rotvec,
original Matlab version by
Peter I. Corke
CSIRO Manufacturing Science and Technology
Scilab implementation by
Interdepartmental Research Center "E. Piaggio", University of Pisa
Corke, P.I. "A Robotics Toolbox for MATLAB", IEEE Robotics and Automation Magazine, Volume 3(1), March 1996, pp. 24-32