-
Notifications
You must be signed in to change notification settings - Fork 15
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
Division by zero problem #22
Comments
Thanks for finding those, one big part of porting from C++ to ST involves to handle those exceptions as C++ doesn’t throw on those and the calculation is thrown away later if this happens. Could you post the trajectories you are trying to compute please (start,end,limits,…), then I can add unittests for them. The fix is to check if those arguments are 0 and skip the calculation if they are. Struckig is always calculation all potential solutions and the using the fastest one. |
Seeing the in the last commit the unittests failed, this could also be a regression, you could try with an actual release by downloading it from https://github.com/stefanbesler/struckig/releases or checking out the tag of the release (git checkout v0.9.3) but anyway, this needs a fix :-) |
Issue should be fixed with the latest commit b9ca5aa Unittests don't cover this path at the moment, would be great if you could send me the trajectories where you got these exceptions. |
@stefanbesler Thanks for your fix. I did not record the original input. Will verify this fix after your merge. |
I tried the code on TwinCAT3 and found the PLC will run into fault because the denominator is zero (3 places as shown in the following figure). I am wondering how to fix it?
Also the sqrt of a negative number will occasionally happen:
The text was updated successfully, but these errors were encountered: