Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up[SofaKernel] FIX bug in toEulerVector #399
Conversation
This comment has been minimized.
This comment has been minimized.
Thank you for your pull request! |
untereiner
added
the
status: to review
label
Sep 14, 2017
This comment has been minimized.
This comment has been minimized.
Thanks for your PR @raffaellatrivisonne :-) |
This comment has been minimized.
This comment has been minimized.
[ci-build] |
guparan
added
status: wip
and removed
status: to review
labels
Sep 20, 2017
This comment has been minimized.
This comment has been minimized.
@raffaellatrivisonne could you fix the build failure please? |
This comment has been minimized.
This comment has been minimized.
[ci-build] |
This comment has been minimized.
This comment has been minimized.
The function asin is defined in [-1,1]. |
untereiner
added
status: to review
and removed
status: wip
labels
Oct 11, 2017
This comment has been minimized.
This comment has been minimized.
From SOFA-dev meeting: |
guparan
added
the
pr: fix
label
Oct 19, 2017
This comment has been minimized.
This comment has been minimized.
I think I get your point but it adds an another parameter that changes nothing in practice. Here the point is to cut everything outside the bounds. With your suggestions, who will test the sensibility of this epsilon parameter ? It is not acceptable to have a number outside these bounds since asin is not defined at all |
This comment has been minimized.
This comment has been minimized.
const double epsilon = 1e-15;
Real y = Real(2.)*(q[3]*q[1] - q[2]*q[0]);
if( std::abs( double(y) ) - 1.0 > epsilon )
{
msg_error("Quat") << "Unexpectedly out of bounds argument for asin: " << y << msgendl;
} or const double epsilon = 1e-15;
Real y = Real(2.)*(q[3]*q[1] - q[2]*q[0]);
if( std::abs( double(y) ) - 1.0 > epsilon )
{
Real force_round = std::max( Real(-1.0), std::min(Real(1.0), y) );
msg_warning("Quat") << "Unexpectedly out of bounds argument for asin: " << y
<< "Force rounding to " << force_round << msgendl;
y = force_round;
} |
This comment has been minimized.
This comment has been minimized.
Why 1e-15 ? why not 1e-11 ? I guess Raphaella's number was just an example. I completely disagree with this idea. Introducing a new random chosen very locally defined epsilon is really a bad idea. But if it a command from the consortium guy's to close this pr I have to bow |
This comment has been minimized.
This comment has been minimized.
There is no command and I am far to pretend knowing enough how things are done in SOFA to claim my proposal is what has to be done. It is just a proposal discussed during last SOFA-dev meeting. |
This comment has been minimized.
This comment has been minimized.
Well, the message sounded like "you have to add an epsilon value" |
hugtalbot
added
status: wip
and removed
status: to review
labels
Oct 25, 2017
This comment has been minimized.
This comment has been minimized.
Hi everybody, |
This comment has been minimized.
This comment has been minimized.
Just passing by, I do not want to raise a flame war but actuall asin method has some documentation,
Then looking at This is probably not relevant here, since I presume the checks are there because in theory when a quaternion is normalized the value of |
This comment has been minimized.
This comment has been minimized.
Thanks for the explanations @raffaellatrivisonne and @fjourdes, let's merge then ! :-) |
guparan
added
status: ready
and removed
status: wip
labels
Nov 9, 2017
This comment has been minimized.
This comment has been minimized.
[ci-build] |
damienmarchal
added
status: to review
and removed
status: ready
labels
Nov 10, 2017
This comment has been minimized.
This comment has been minimized.
Do someone knows why do tests are failing ? (In QuaterTest) |
This comment has been minimized.
This comment has been minimized.
I'm taking a look. |
This comment has been minimized.
This comment has been minimized.
I'm trying to debug to see where it fails, but it will take a little bit more than expected. |
This comment has been minimized.
This comment has been minimized.
So if I understood well we have 2 problems here:
|
This comment has been minimized.
This comment has been minimized.
The inital problem is the vector (that in my screenshot I call "q0 euler") which has its second component which is NaN.
But definetively EXPECT_EQ(p0,p1) should not pass with nan values for p1 |
This comment has been minimized.
This comment has been minimized.
maybe I am stating something already well known, but with c++11 there are some built in functions that can help to test floating point arithmetic.
|
hugtalbot
added
status: wip
and removed
status: to review
labels
Nov 15, 2017
This comment has been minimized.
This comment has been minimized.
Hi everybody, I'm trying to work on this PR, but I'm quite busy with my PhD in this moment and I don't think I will be able to finish it within a short delay. |
guparan
referenced this pull request
May 16, 2018
Open
Test RigidLinearDeformationMappings_test failing sometimes #93
raffaellatrivisonne
and others
added some commits
Jun 7, 2017
guparan
force-pushed the
mimesis-inria:Quater_fix
branch
from
823bd99
to
5e666a7
Sep 10, 2018
This comment has been minimized.
This comment has been minimized.
Hey, I just cleaned this oooooold PR. |
raffaellatrivisonne commentedSep 14, 2017
•
edited by guparan
This PR:
Reviewers will merge only if all these checks are true.