Scilab Function
Last update : April 2007

rt_ctraj - compute a Cartesian trajectory between two points[view code]

Calling Sequence

TC = rt_ctraj(T0, T1, n)
TC = rt_ctraj(T0, T1, R)

Parameters

Description

This function returns a Cartesian trajectory (straight line motion) TC from the point represented by homogeneous transform T0 to T1. The number of the point along the path is n or the length of the given vector R. For the second case R is a vector of distances along the path (in the range 0 to 1) for each point. The first case has the points equally spaced, but different spacing may be specified to achieve acceptable acceleration profile.

Examples

   // To create a Cartesian path with smooth acceleration we can use the
   // rt_jtraj() function to create the path vector r with continuous
   // derivatives.

   T0 = rt_transl([0, 0, 0]);     // starting point
   T1 = rt_transl([-1, 2, 1]);    // arrival point
   t = [0:0.056:10];              // time vector
   r = rt_jtraj(0, 1, t);         // path vector with continuous derivatives
   TC = rt_ctraj(T0, T1, r);      // Cartesian trajectory

   // plot results
   cfh = scf();
   drawlater();
   xgrid(); xtitle("", "Time (s)", ""); plot(t, rt_transl(TC));
   a1 = cfh.children; a1.data_bounds = [0 -1; 10 2];
   a1.tight_limits = "on"; a1.auto_ticks = ["off" "off" "off"];
   a1.x_ticks = tlist(["ticks", "locations", "labels"],..
        [0 1 2 3 4 5 6 7 8 9 10],..
        ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"]);
   a1.y_ticks = tlist(["ticks", "locations", "labels"],..
        [-1 -0.5 0 0.5 1 1.5 2], ["-1" "-0.5" "0" "0.5" "1" "1.5" "2"]);
   drawnow();

  

See Also

rt_qinterp,  rt_transl,  rt_trinterp,  

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. 24-32

R. P. Paul, Robot Manipulators: Mathematics, Programming and Control. Cambridge, Massachusetts: MIT Press, 1981.

Get the Robotics Toolbox for Scilab/Scicos at SourceForge.net. Fast, secure and Free Open Source software downloads