rt_trinterp - interpolate homogeneous transforms[view code]
This function interpolates between the two homogeneous transforms T0 and T1 as r varies between 0 and 1 inclusively. This is generally used for computing straight line or 'Cartesian' motion. Rotational interpolation is achieved using quaternion spherical linear interpolation (slerp).
// Consider the following example of interpolation of homogeneous // transforms T1 = rt_rotx(0.2), T2 = rt_transl(1, 4, 5) * rt_roty(0.3), // r = 0 Ta = rt_trinterp(T1, T2, 0), // should be T1 // r = 1 Tb = rt_trinterp(T1, T2, 1), // should be T2 // r = 0.5 Tc = rt_trinterp(T1, T2, 0.5), // 'half way' in between
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.