Closed ivan866 closed 6 years ago
Can you please tell me how you use the file "skinematics-invalid-sqrt.txt" to get to the RuntimeWarning?
Also, I have gone back to the original sequence in "analytical", and used named variables (according to your suggestion).
I am a bit unsure if unnamed variables are not more "concise". Your opinion would be appreciated!
Prof. (FH) PD Dr. Thomas Haslwanter School of Applied Health and Social Sciences University of Applied Sciences Upper Austria FH OÖ Studienbetriebs GmbH Garnisonstraße 21 4020 Linz/Austria Tel.: +43 (0)5 0804 -52170 Fax: +43 (0)5 0804 -52171 E-Mail: Thomas.Haslwanter@fh-linz.at Web: bim.fh-linz.at or work.thaslwanter.at
From: Ivan notifications@github.com Sent: Monday, December 18, 2017 7:24 PM To: thomas-haslwanter/scikit-kinematics Cc: Subscribed Subject: [thomas-haslwanter/scikit-kinematics] Invalid SQRT (#13)
rotmat.py:300: RuntimeWarning: invalid value encountered in sqrt q[3] = 0.5 * np.copysign(np.sqrt(1-R11-R22+R33), R21-R12)
This is the data in question: skinematics-invalid-sqrt.txthttps://github.com/thomas-haslwanter/scikit-kinematics/files/1569020/skinematics-invalid-sqrt.txt
- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/thomas-haslwanter/scikit-kinematics/issues/13, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABdaRaRAliviRmAIGNBkpwfl1dh-usymks5tBq3wgaJpZM4RF4Z2.
That was one of the typical problems when using rotation matrices. Went to quaternions (in "imus.analytical"), so the problem should be fixed now.
v.0.6.3 Is there a way in numpy
to deal with such situations when expected value of 0.0 is calculated as a very small negative fraction before sending it to sqrt()
?
No :(
Prof. (FH) PD Dr. Thomas Haslwanter School of Applied Health and Social Sciences University of Applied Sciences Upper Austria FH OÖ Studienbetriebs GmbH Garnisonstraße 21 4020 Linz/Austria Tel.: +43 (0)5 0804 -52170 Fax: +43 (0)5 0804 -52171 E-Mail: Thomas.Haslwanter@fh-linz.at Web: bim.fh-linz.at or work.thaslwanter.at
From: Ivan notifications@github.com Sent: Wednesday, December 20, 2017 6:46 PM To: thomas-haslwanter/scikit-kinematics Cc: Haslwanter Thomas; State change Subject: Re: [thomas-haslwanter/scikit-kinematics] Invalid SQRT (#13)
Is there a way in numpy to deal with such situations when expected value of 0.0 is calculated as a very small negative fraction before sending it to sqrt()?
- You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/thomas-haslwanter/scikit-kinematics/issues/13#issuecomment-353133746, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABdaRQYCVFz0_VwgQvedDoB5BlmI7tPAks5tCUgBgaJpZM4RF4Z2.
rotmat.py:300: RuntimeWarning: invalid value encountered in sqrt q[3] = 0.5 * np.copysign(np.sqrt(1-R11-R22+R33), R21-R12)
This is the data in question: skinematics-invalid-sqrt.txt