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

Wrapping prior factor and general sfm factor or Cal3Bundler #644

Merged
merged 3 commits into from
Dec 29, 2020

Conversation

ayushbaid
Copy link
Contributor

The python API has support for PriorFactor and GeneralSFMFactor2 for calibration class Cal3_S2, but not for Cal3Bundler.

In this PR, we add the same wraps for Cal3Bundler calibration class.

@ayushbaid ayushbaid added easy-fix Quick and easy to fix enhancement Improvement to GTSAM python Related to python wrapper quick-review Quick and easy PR to review labels Dec 28, 2020
Copy link
Collaborator

@varunagrawal varunagrawal left a comment

Choose a reason for hiding this comment

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

Great work, just 1 small nitpick.

gtsam/gtsam.i Outdated
@@ -2666,14 +2666,17 @@ typedef gtsam::GeneralSFMFactor<gtsam::PinholeCameraCal3_S2, gtsam::Point3> Gene
typedef gtsam::GeneralSFMFactor<gtsam::PinholeCameraCal3DS2, gtsam::Point3> GeneralSFMFactorCal3DS2;
typedef gtsam::GeneralSFMFactor<gtsam::PinholeCamera<gtsam::Cal3Bundler>, gtsam::Point3> GeneralSFMFactorCal3Bundler;

template<CALIBRATION = {gtsam::Cal3_S2}>
template<CALIBRATION>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is a single template parameter, you can just list out the template arguments and get rid of the typedefs, like this:

template<CALIBRATION = {gtsam::Cal3_S2, gtsam::Cal3DS2, gtsam::Cal3Bundler}>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This works! Thanks!

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.

Please try Varun's suggestion, then feel free to merge.

Copy link
Collaborator

@varunagrawal varunagrawal left a comment

Choose a reason for hiding this comment

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

LGTM

@varunagrawal varunagrawal merged commit 11b155a into develop Dec 29, 2020
@varunagrawal varunagrawal deleted the fix/cal3bundler branch December 29, 2020 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy-fix Quick and easy to fix enhancement Improvement to GTSAM python Related to python wrapper quick-review Quick and easy PR to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants