Imu Factor + ISAM2 bug
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)
-
reporter -
-
assigned issue to
- edited description
-
assigned issue to
-
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.
-
-
assigned issue to
-
assigned issue to
-
Of course, still a mystery why full graph does not crash.
-
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.
-
- changed status to closed
Merged in fix/ImuFactor (pull request #325) close issue
#280TBB/cython bug on Mac seems unrelated→ <<cset c6d9baf3ce4b>>
- Log in to comment
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?