def resample_quaternions(times, quaternions, dt):
  """
  Resample the quaternions based on the new interval dt within the interval
  spanned by the first and last time stamp in 'times'.
  Uses SLERP for quaternion interpolation.
  """
  interval = times[-1] - times[0]
  samples = np.linspace(times[0], times[-1], interval / dt + 1)
  return (resample_quaternions_from_samples(times, quaternions, samples),
          samples)

  Resample the quaternions based on the new interval dt within the interval
  spanned by the first and last time stamp in 'times'.
  Uses SLERP for quaternion interpolation.
  
hand_eye_calibration/python/hand_eye_calibration/time_alignment.py