Scilab Function
Last update : April 2007
rt_transl  set or extract the translational component of a homogeneous transform[view code]
Calling Sequence
 T = rt_transl(x, y, z)
 T = rt_transl(v)
 v = rt_transl(T)
 XZY = rt_transl(TC)
Parameters

x
: scalar. It represents the Xaxis component of the translation vector, with respect to a basic reference frame.

y
: scalar. It represents the Yaxis component of the translation vector, with respect to a basic reference frame.

z
: scalar. It represents the Zaxis component of the translation vector, with respect to a basic reference frame.

v
: 3element 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.

T
: 4by4 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.

TC
: 4by4bym hypermatrix (m is arbitrary). A Cartesian trajectory matrix.

XYZ
: mby3 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.
Description

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 3element column vector.

The fourth form returns a matrix whose columns are the X, Y, and Z columns of the 4by4bym Cartesian trajectory matrix TC.
Examples
// 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);
See Also
rt_ctraj, rt_rotx, rt_roty, rt_rotz, rt_rotvec,
Authors
original Matlab version by

Peter I. Corke
CSIRO Manufacturing Science and Technology
Scilab implementation by

Matteo Morelli
Interdepartmental Research Center "E. Piaggio", University of Pisa
Bibliography
Corke, P.I. "A Robotics Toolbox for MATLAB", IEEE Robotics and Automation Magazine, Volume 3(1), March 1996, pp. 2432