Updating magnetometer factor to GTSAM's new built-in `MagPoseFactor`
tmcg0 opened this issue · 0 comments
tmcg0 commented
Background:
When I first started developing bioslam, gtsam only had a magnetometer factor which hooked into a Rot3
object, not a Pose3
object (which are the objects we use to store the pose of IMUs in bioslam). So I developed a custom factor (MagPose3Factor
) to add a magnetometer factor to a Pose3
object. Recently, a pull request was merged on gtsam that added a factor which does exactly what I wanted in the first place. It adds the factor MagPoseFactor
which is probably way more robust and better-tested than the one I had made. We should switch bioslam to use this.
What to do:
Swap out bioslam's custom MagPose3Factor
with the new gtsam built-in MagPoseFactor
.
Caveats:
- This new GTSAM factor just got merged and won't be available in an official GTSAM release til GTSAM 4.1. So don't do this switch until GTSAM 4.1 is out and we force bioslam to require GTSAM >= 4.1.
Right now it's in gtsam_unstable, and I'm not sure why. Consider if we want bioslam to depend ongtsam_unstable
components.- As of GTSAM PR borglab/gtsam#788, this factor is now in stable! Will be available whenever GTSAM 4.1 is tagged.