Skip to content

INTERPOLATESE3 - Interpolates between two SE(3) transformations.

Z = interpolateSE3(X,Y,t) interpolates between two SE(3) transformations X and Y using a parameter t. The resulting transformation is returned in Z.

Z = interpolateSE3(X,Y,t,varargin) allows additional options to be specified through varargin. Currently supported options are:

  - 'equal': Sets the velocity twist equal between X and Y.
  - 'zero': Sets the velocity and acceleration twist zero for X.

Input:

  X - The initial SE(3) transformation.
  Y - The final SE(3) transformation.
  t - The interpolation parameter (between 0 and 1).
  varargin - Additional options for interpolation (optional).

Output:

  Z - The interpolated SE(3) transformation.

Example:

  H1 = SE3(rotx(0),[0,0,0]);
  H2 = SE3(rotx(pi/3) * roty(pi),[1,0,1])

  [p1,ux1,uy1,uz1] = backbone(H1);
  fquiver(p1,ux1,.25,'b','LineW',3); hold on;
  fquiver(p1,uy1,.25,'r','LineW',3); 
  fquiver(p1,uz1,.25,'g','LineW',3);

  [p2,ux2,uy2,uz2] = backbone(H2);
  fquiver(p2,ux2,.25,'b','LineW',3); hold on;
  fquiver(p2,uy2,.25,'r','LineW',3); 
  fquiver(p2,uz2,.25,'g','LineW',3);

  axis equal;
  t = linspace(0,1,10);

  for ii = 2:numel(t)-1
      G = interpolateSE3(H1,H2,t(ii),'zeros');
      [p2,ux2,uy2,uz2] = backbone(G);
      fquiver(p2,ux2,.15,'b','LineW',2); hold on;
      fquiver(p2,uy2,.15,'r','LineW',2); 
      fquiver(p2,uz2,.15,'g','LineW',2); 
  end

  view(30,30);

See also logmapSO3, expmapSO3

Reference: F.C. Park, Smooth Invariant Interpolation of Rotations.