Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HybridFactorGraph discreteKeys has duplicate keys #1384

Closed
varunagrawal opened this issue Jan 11, 2023 · 1 comment
Closed

HybridFactorGraph discreteKeys has duplicate keys #1384

varunagrawal opened this issue Jan 11, 2023 · 1 comment
Assignees

Comments

@varunagrawal
Copy link
Collaborator

Description

Calling HybridFactorGraph::discreteKeys results in duplicate keys which can lead to subtle bugs.
For example, if we pass in the result to gtsam::DiscreteValues::CartesianProduct(); this would result in a much more expensive computation since instead of 3 discrete keys, we now have many more.

We can't use discreteKeySet since that method throws away the cardinality of the discrete keys.

Steps to reproduce

Call HybridFactorGraph::discreteKeys and print out the result.

@dellaert
Copy link
Member

Good catch, fixed in #1380, please approve that ASAP as I want to build on it.

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

No branches or pull requests

2 participants