ethz-asl/hand_eye_calibration

something about function calculate_time_offset

Closed this issue · 3 comments

Get the two mean time steps. Take the smaller one for the interpolation.

dt_A = np.mean(np.diff(times_A))
dt_B = np.mean(np.diff(times_B))
if dt_A >= dt_B:
dt = dt_A
else:
dt = dt_B
I note that the comment take the smaller one, but the code takes the bigger one....

Same thing appears to happen in function compute_aligned_poses (note the >= sign):

# Resample at the lower frequency to prevent introducing more noise.
dt_A = np.mean(np.diff(time_stamped_poses_A_shifted[:, 0]))
dt_B = np.mean(np.diff(time_stamped_poses_B[:, 0]))
if dt_A >= dt_B:
dt = dt_A
timestamps_low = time_stamped_poses_A_shifted[:, 0].T
timestamps_high = time_stamped_poses_B[:, 0].T
else:
dt = dt_B
timestamps_low = time_stamped_poses_B[:, 0].T
timestamps_high = time_stamped_poses_A_shifted[:, 0].T

Actually, frequency is the inverse of time. So "lower frequency" means <= when comparing arrays in the time domain.

Actually, frequency is the inverse of time. So "lower frequency" means <= when comparing arrays in the time domain.

I made a mistake, and get it now, thank you!