-
Notifications
You must be signed in to change notification settings - Fork 92
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
Factored out the checkIsometry() helper function into a standalone header library. #144
Conversation
213d8dc
to
ede05d0
Compare
Codecov Report
@@ Coverage Diff @@
## noetic-devel #144 +/- ##
================================================
+ Coverage 55.54% 55.86% +0.32%
================================================
Files 11 12 +1
Lines 1723 1722 -1
================================================
+ Hits 957 962 +5
+ Misses 766 760 -6
Continue to review full report at Codecov.
|
ede05d0
to
c303c17
Compare
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.
From my point of view, the checkIsometry function is somewhat over-engineered, allowing to pass the precision as well.
The rationale for passing the precision and setting it one order "higher" than the precision used for comparison was because I didn't like errors like:
But if it seems over-engineered to you, I can make the precision hard-coded which would simplify the code. |
I was expecting the |
I'm not for introducing other possible rounding/representation errors. I was also thinking about subtracting ones, but in the end I think that showing the raw computed values is more valuable. |
c303c17
to
a0f24b0
Compare
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 still don't like the complexity of the code, but I approve. It's up to @v4hn to ask for more simplification if necessary.
Thanks. I'm open to discussion. |
I don't think you introduce new rounding errors by the proposed approach. You will just focus on the deviations from the expected values. |
I was more concerned about representation errors of IEEE floats. In 32 bits, There are approx 2^30 numbers between 0 and 1, and only 2^23 between 1 and 2. But I don't think that if you take a number from 1-2 range and subtract one, you'd have a guarantee that you'll find a corresponding normal float in the 0-1 range. However, since these values are anyways computed by SVD, they probably accumulate so many errors during the computation that caring about the representation of the result can be seen as a negligible issue... So, okay, you convinced me to subtract ones and use the scientific format :) |
a0f24b0
to
7fc9e4f
Compare
7fc9e4f
to
5172b9d
Compare
As suggested in moveit/moveit#1964 .
I made the checkIsometry() function available also in release mode, so that the check can be used at other places than inside the assert macro.