Skip to content

Conversation

varunagrawal
Copy link
Contributor

Set GTSAM_SLOW_BUT_CORRECT_EXPMAP to ON by default and print deprecation warning.

This is based on findings by @dellaert and I on the accuracy of the exponential map of Pose2 for hybrid state estimation with the City10000 dataset.

With the flag off, we get
city10000_results_110
where the trajectory is elongated.

With the flag on, we get a better trajectory.
city10000_results_110_2

Similar results can be seen for longer trajectories (e.g. 220 timesteps).

Flag OFF

city10000_results_220_original

Flag ON

city10000_results_220

@varunagrawal varunagrawal requested a review from dellaert March 7, 2025 21:02
@varunagrawal varunagrawal self-assigned this Mar 7, 2025
@varunagrawal
Copy link
Contributor Author

Some of the failing tests are because of quite different results (e.g. $\theta = -\pi$ instead of $\pi$) so going to spend time later tonight debugging this some more.

@varunagrawal
Copy link
Contributor Author

@dellaert the TSAM factor tests are failing with wildly different Jacobians (e.g. values of 7 in expected and 3 in actual).

It might be something with how the factor Jacobians are being computed. Any thoughts since I am not super familiar with this at the moment?

@dellaert
Copy link
Member

dellaert commented Mar 9, 2025

I'll take a look, please review Hat&Vee PR?

@dellaert
Copy link
Member

dellaert commented Mar 9, 2025

I fixed all tests (on my MacBook) but had to comment out a test in GnC, @lucacarlone

@varunagrawal
Copy link
Contributor Author

Okay nice, I had similar fixes locally but wanted to double check with you.

Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add some computer time benchmarks before merging this

option(GTSAM_SLOW_BUT_CORRECT_EXPMAP "Use slower but correct expmap for Pose2" OFF)
option(GTSAM_SLOW_BUT_CORRECT_EXPMAP "Use slower but correct expmap for Pose2" ON)

message(WARNING "GTSAM_SLOW_BUT_CORRECT_EXPMAP has been deprecated and will be removed in a future release.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this message be displayed only when set to OFF?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

@varunagrawal varunagrawal requested a review from dellaert March 9, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants