Closed samarth-robo closed 5 years ago
Hmm, it seems this PR should not be merged. Using //
will result in integers in fractions
and thus the interpolations are wrong. In python3, /
will give float numbers in fractions
, which is desired.
The nan
might be caused by the case that requested_timestamps
is out of the range of pose_timestamps
in interpolate_poses()
, which is currently not properly handled by the function.
This ensures that
fractions
is calculated usingnp.floor_divide()
as originally intended. As mentioned in https://docs.scipy.org/doc/numpy/reference/generated/numpy.divide.html, using the/
operator in Python 3 numpy callsnp.true_divide()
rather thannp.floor_divide()
. Not having this fix produces somenan
poses.