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

Update to new method names in gtsam SfmTrack and SfmData #451

Merged
merged 9 commits into from
Feb 9, 2022

Conversation

akshay-krishnan
Copy link
Collaborator

@akshay-krishnan akshay-krishnan commented Feb 8, 2022

This only changes some method names, for ex: number_measurements() - > numberMeasurements(), add_measurement() -> addMeasurement(), due to the change on gtsam.

GTSAM PR: borglab/gtsam#1082

@akshay-krishnan akshay-krishnan marked this pull request as draft February 8, 2022 07:09
@akshay-krishnan
Copy link
Collaborator Author

Need to update the GTSAM wheel in the CI, left a TODO in setup.py

@johnwlambert
Copy link
Collaborator

thanks for the PR, @akshay-krishnan. A few more names for us to update, according to the CI:

==================================== ERRORS ====================================
______________ ERROR collecting tests/test_two_view_estimator.py _______________
tests/test_two_view_estimator.py:[17](https://github.com/borglab/gtsfm/runs/5113140405?check_suite_focus=true#step:7:17): in <module>
    EXAMPLE_DATA = io_utils.read_bal(gtsam.findExampleDataFile(GTSAM_EXAMPLE_FILE))
gtsfm/utils/io.py:137: in read_bal
    num_images = sfm_data.number_cameras()
E   AttributeError: 'gtsam.gtsam.SfmData' object has no attribute 'number_cameras'
___________ ERROR collecting tests/bundle/test_bundle_adjustment.py ____________
tests/bundle/test_bundle_adjustment.py:15: in <module>
    EXAMPLE_DATA = io_utils.read_bal(gtsam.findExampleDataFile(GTSAM_EXAMPLE_FILE))
gtsfm/utils/io.py:137: in read_bal
    num_images = sfm_data.number_cameras()
E   AttributeError: 'gtsam.gtsam.SfmData' object has no attribute 'number_cameras'
_______________ ERROR collecting tests/common/test_gtsfm_data.py _______________
tests/common/test_gtsfm_data.py:[19](https://github.com/borglab/gtsfm/runs/5113140405?check_suite_focus=true#step:7:19): in <module>
    EXAMPLE_DATA = io_utils.read_bal(gtsam.findExampleDataFile(GTSAM_EXAMPLE_FILE))
gtsfm/utils/io.py:1[37](https://github.com/borglab/gtsfm/runs/5113140405?check_suite_focus=true#step:7:37): in read_bal
    num_images = sfm_data.number_cameras()
E   AttributeError: 'gtsam.gtsam.SfmData' object has no attribute 'number_cameras'
______________ ERROR collecting tests/utils/test_serialization.py ______________
tests/utils/test_serialization.py:15: in <module>
    EXAMPLE_DATA = io_utils.read_bal(gtsam.findExampleDataFile(GTSAM_EXAMPLE_FILE))
gtsfm/utils/io.py:137: in read_bal
    num_images = sfm_data.number_cameras()
E   AttributeError: 'gtsam.gtsam.SfmData' object has no attribute 'number_cameras'
=============================== warnings summary ===============================

@akshay-krishnan akshay-krishnan marked this pull request as ready for review February 9, 2022 03:32
Copy link
Contributor

@ayushbaid ayushbaid left a comment

Choose a reason for hiding this comment

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

You might also need to update the wheel links in the README.

Comment on lines 13 to 14
unzip gtsam-4.2a5-cp38-cp38-manylinux2014_x86_64.whl.zip
pip install gtsam-4.2a5-cp38-cp38-manylinux2014_x86_64.whl
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: you can export the name to make it easier from next time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

udpated, hopefully the change is what you meant.

Copy link
Collaborator

Choose a reason for hiding this comment

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

looks better!

Copy link
Collaborator

@johnwlambert johnwlambert left a comment

Choose a reason for hiding this comment

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

LGTM, very nice. Thanks Akshay

@johnwlambert johnwlambert merged commit 1b8041a into master Feb 9, 2022
@johnwlambert johnwlambert deleted the sfmtrack-update branch February 9, 2022 15:28
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.

3 participants