Remove all methods `ProcessorMotion::interpolate(...)`
When a KF callback is accepted by one ProcessorMotion
, the motion data, and its deltas, are interpolated to match exactly the time stamp of the KF callback. This happens within one of the data ticks stored in the motion buffer.
The interpolation methods are very difficult and the code that we have has always been problematic: we need to interpolate:
- the time interval
- the motion data
- the current delta
- the pre-integrated delta
- the three covariances of the above
- the jacobians of the above.
Besides, for a correct interpolation we need to know whether the motion data has been provided as a "velocity and time" (e.g. IMU), or as a displacement (e.g. odometers). In one case, interpolation does not modify data, as the velocity does not change when the time interval is reduced. In the other case, displacement data needs to be modified if the time interval is reduced. Knowing whether data has been provided one way or another is not possible in the bas class ProcessorMotion (unless we add a boolean marking this), and so the interpolate()
implemented in ProcessorMotion
might be useless, or directly wrong.
Additionally, we usually have very small dt
values and interpolation is of no practical impact in this case.
All gtests trying to validate the different interpolation options are really a mess.
For all these reasons I believe it is the best option to completely forget about interpolation.