Sachini / ronin

RoNIN: Robust Neural Inertial Navigation in the Wild
GNU General Public License v3.0
299 stars 106 forks source link

Possible error in ATE/RTE metric calculation #8

Open scottsun95 opened 4 years ago

scottsun95 commented 4 years ago

Hi,

I was looking at this line of your ATE calculation https://github.com/Sachini/ronin/blob/59b2a23a9be6028a8985b4535360ff925d44202e/source/metric.py#L18

and these lines of your RTE calculation https://github.com/Sachini/ronin/blob/59b2a23a9be6028a8985b4535360ff925d44202e/source/metric.py#L43-L44

Based on your cited source, I am wondering if you are missing a norm in the error calculation, as you would want to be calculating the Euclidean distance between the estimated and ground truth positions. The equations, as written, appear to be computing the mean over all the individual squared x and y components. In other words, shouldn't this calculation be the following?

np.sqrt(np.mean(np.linalg.norm(est - gt) ** 2)

Thanks, Scott

Sachini commented 3 years ago

Thank you for pointing this out Scott. You'e correct, for euclidian distance we'd have to modify as you suggested to np.sqrt(np.mean(np.linalg.norm(est - gt, axis=1) ** 2) which would increase all the errors reported by a factor of sqrt(2)