ori-mrg / robotcar-dataset-sdk

Software Development Kit for the Oxford Robotcar Dataset
Other
265 stars 93 forks source link

Python 3 compatibility #13

Closed samarth-robo closed 5 years ago

samarth-robo commented 6 years ago

This ensures that fractions is calculated using np.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 calls np.true_divide() rather than np.floor_divide(). Not having this fix produces some nan poses.

rui2016 commented 4 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.