-
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
Fix warnings and docs #1181
Fix warnings and docs #1181
Conversation
varunagrawal
commented
Apr 29, 2022
- Fix the warnings due to type mismatch in newly introduced methods.
- Update docs for IMU factors clarifying what frame the measurements are in.
gtsam/geometry/Pose2.cpp
Outdated
@@ -365,7 +365,7 @@ boost::optional<Pose2> Pose2::Align(const Matrix& a, const Matrix& b) { | |||
"Pose2:Align expects 2*N matrices of equal shape."); | |||
} | |||
Point2Pairs ab_pairs; | |||
for (size_t j=0; j < a.cols(); j++) { | |||
for (size_t j=0; j < size_t(a.cols()); j++) { |
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.
Thanks for the pr, I was also thinking of fixing them :-)
IMO, for C++ the C-type cast used here might be replaced by the more explicit static_cast.
That's in general. For these pair of warnings in particular I think it may make more sense to replace the loop counter variable from size_t to Eigen::Index, that should avoid casts at all and fix warnings, but haven't tried it yet...
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.
Great suggestion. I'll try them out and update!
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.
Eigen::Index
works great!
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