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

Moved Sfm classes to their own files #1078

Merged
merged 10 commits into from
Feb 1, 2022
Merged

Moved Sfm classes to their own files #1078

merged 10 commits into from
Feb 1, 2022

Conversation

dellaert
Copy link
Member

  • Moved SfmData and SfmTrack into sfm
  • deprecated incorrectly named functions
  • moved wrapping

@dellaert dellaert changed the base branch from develop to feature/more_wrapping January 31, 2022 14:31
bool equals(const SfmTrack& sfmTrack, double tol = 1e-9) const;

/// @}
#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Frank, thanks for the PR. Was curious how long we plan to keep this flag set to true by default (GTSAM_ALLOW_DEPRECATED_SINCE_V42).

We do use the number_measurements() flag and number_tracks() methods all over GTSFM, so we would need to refactor quite a few files. Was just curious the rationale for the renaming.

Copy link
Member Author

Choose a reason for hiding this comment

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

Flag should actually be OFF by default.
Yes, I'm aware that if we build a new wheel (4.2a5) you'll have to amend GTSAM.

@johnwlambert
Copy link
Contributor

Looks like CI is failing:

[ 24%] Building CXX object gtsam/CMakeFiles/gtsam.dir/sfm/SfmData.cpp.o
[ 24%] Building CXX object gtsam/CMakeFiles/gtsam.dir/sfm/SfmTrack.cpp.o
/home/runner/work/gtsam/gtsam/gtsam/sfm/SfmTrack.cpp:30:1: error: stray ‘\303’ in program
 bool SfmTrack::equals(const SfmTrack& sfmTrack, double tolÏ) const {
 ^
/home/runner/work/gtsam/gtsam/gtsam/sfm/SfmTrack.cpp:30:1: error: stray ‘\217’ in program
make[3]: *** [gtsam/CMakeFiles/gtsam.dir/sfm/SfmTrack.cpp.o] Error 1
gtsam/CMakeFiles/gtsam.dir/build.make:1797: recipe for target 'gtsam/CMakeFiles/gtsam.dir/sfm/SfmTrack.cpp.o' failed
make[3]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:3093: recipe for target 'gtsam/CMakeFiles/gtsam.dir/all' failed
make[2]: *** [gtsam/CMakeFiles/gtsam.dir/all] Error 2
CMakeFiles/Makefile2:2267: recipe for target 'CMakeFiles/check.dir/rule' failed
make[1]: *** [CMakeFiles/check.dir/rule] Error 2
Makefile:199: recipe for target 'check' failed

@dellaert
Copy link
Member Author

Looks like CI is failing:

I know, I'll fix it, along with addressing any other comments you might have. If you have no comments, please approve. If you do, still approve and trust me I will execute on them or talk to you if not :-)

@johnwlambert
Copy link
Contributor

Sounds good @dellaert. The PR looks nice and I'll approve on my end. I like the decomposition of the BAL stuff into sfmData.cpp, since it never belonged in slamDataset.cpp so much.

I understand the snake case -> camel case change, to be consistent with our C++ guidelines. But I personally would find SfmData.numberTracks() to be more readable than .nrTracks(). This is a minor nit though, and if you feel like the latter is more consistent with GTSAM conventions, that's fine with me.

@dellaert
Copy link
Member Author

But I personally would find SfmData.numberTracks() to be more readable than .nrTracks(). This is a minor nit though, and if you feel like the latter is more consistent with GTSAM conventions, that's fine with me.

yeah, I could change that...

Base automatically changed from feature/more_wrapping to develop February 1, 2022 04:36
@dellaert dellaert merged commit 236dbcb into develop Feb 1, 2022
@dellaert dellaert deleted the feature/sfm_data branch February 1, 2022 04:36
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