-
Notifications
You must be signed in to change notification settings - Fork 767
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
add Sim(3)-based alignment to the wrapper #702
Conversation
Hi John. Is this algorithm the same as what we are trying to implement in GTSFM? |
Yes, although PosePairs (wTi, wTi_) from wTi_list, wTi_list_ is the one that was suggested: https://github.com/borglab/gtsam/blob/develop/gtsam_unstable/geometry/Similarity3.cpp#L170 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also add some unit tests for Similarity3 if there are not any already, especially since its being taken out of unstable.
Agreed, yeah we should do that |
It looks like there is a testSimilarity3 in unstable which broke because we moved the file. Maybe we can try moving that as well, and that might fix the CI? |
Good point. But also seems like /home/runner/work/gtsam/gtsam/build/python/gtsam.cpp: In function ‘void pybind11_init_gtsam(pybind11::module&)’:
/home/runner/work/gtsam/gtsam/build/python/gtsam.cpp:1163:45: error: ‘PointPairs’ in namespace ‘gtsam’ does not name a type
.def_static("Align",[](const gtsam::PointPairs& abPointPairs){return gtsam::Similarity3::Align(abPointPairs);}, py::arg("abPointPairs"));
^
/home/runner/work/gtsam/gtsam/build/python/gtsam.cpp:1163:129: error: expected ‘)’ before string constant
.def_static("Align",[](const gtsam::PointPairs& abPointPairs){return gtsam::Similarity3::Align(abPointPairs);}, py::arg("abPointPairs")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but please rename PointPairs
to Point3Pairs
and use the preferred using
idiom for typedefs. Also @johnwlambert be sure to link your commits to your account.
Using is more “modern”.
…On Thu, Feb 25, 2021 at 7:27 PM Varun Agrawal ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In gtsam/geometry/Similarity3.h
<#702 (comment)>:
> @@ -30,6 +30,8 @@ namespace gtsam {
// Forward declarations
class Pose3;
+typedef std::vector<Point3Pair> PointPairs;
https://stackoverflow.com/a/23196675/1236990
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#702 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAXPGOHJVBVPGTWYWZKSATTA4IJXANCNFSM4YFIQFRQ>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some minor changes. 🙂
Hmmmm, CI fails, but it seems with a compiler error, and only on Linux :-( |
(Other than that LGTM, but that needs to be investigated before we can merge) |
Yeah, @ProfFan thought it was likely OOM issue from the large gtsam.i file? |
Definitely possible. @jingwuOUO reported similar issues on her Linux box. @ProfFan and @varunagrawal what can we do to split up gtsam.i? One file per subdir? |
I don't think we even need that. We need to figure out a way to break down the |
When |
What happens when you run I agree that the Pybind11 wrapper is a major memory hog. I had to update my swap from 8 GB to 24 GB to prevent my laptop from freezing as well. |
Tried, it will crash sooner. The same error message. |
Oh my swap is 8GB. I might need to update. |
Swapping makes compilation extremely slow (the compiler really does not like the disk). Splitting the header is the fastest way of cutting down compilation time and memory, since splitting |
CI passes now that TBB + Python is disabled in the CI |
discussed changes have been made
Interesting. I wonder if TBB is doing something to cause the OOM (instead of the wrapper). We need to update the TBB dependent code to use the new API. |
3rd python unit test checks alignment here between 4 pose-pairs: