Imu Factor + ISAM2 bug

Issue #280 closed
Robert Truax created an issue

I think I've managed to find a breaking case when using ImuFactors and ISAM2. I've attached what I think is a minimal example. This is based on the SmartFactor example, but only using ImuFactors.

If I put all the factors in at once, it works, but if I do it incrementally in ISAM2, there's an indeterminate system exception. I get this exception in GTSAM4 but not in GTSAM3. I put a #define in there to switch back and forth.

I've also noticed that there are different IMU factors available. Should I transition to the NavState version, the CombinedFactor version, or should I keep this strategy?

Comments (7)

  1. Robert Truax reporter

    It's been a while since I made this. I'd like to help get this fixed, but I get quite lost in iSAM2. Can anyone point me in a direction or to a person who could help?

  2. Frank Dellaert

    Robert, I know this has been two years in coming - sorry :-) However, we're trying to run down GTSAM issues before pushing a GTSAM 4 release and moving on to development of GTSAM 5. I added your script as an example in the branch fix/imuFactor and cleaned it up/modernized it as I was looking at it. I can't see anything wrong with it at face value, but my suspicion is that it bombs simply because the example trajectory is unrealistic and/or does not match the IMU measurements. If you take a look at testScenarios.cpp, that runs a gamut of test trajectories with IMUFactors. I do like your example, and I will assign this issue to you for now. No rush. If you moved on and/or have no time, then I'll change the status of this to wontfix.

  3. Frank Dellaert

    So, my hypothesis is correct: I added a python version of the example, in fix/ImuFactor branch, and corrected the measurements to be correct in the body frame. Neither full nor incremental bombs. A TODO left for you, @robtruax, is to calculate the correct acceleration due to the circular trajectory. Probably k * (y, -x, 0) for some k.

  4. Log in to comment