Skip to content
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

RevoluteJoint::angle() occasionally incorrectly returns NaN #735

Closed
chrisdunelm opened this issue Sep 21, 2024 · 0 comments · Fixed by #736
Closed

RevoluteJoint::angle() occasionally incorrectly returns NaN #735

chrisdunelm opened this issue Sep 21, 2024 · 0 comments · Fixed by #736

Comments

@chrisdunelm
Copy link
Contributor

As far as I can see in my use-case, this is due to numeric imprecision which causes the i value of the ang_err quaternion to be marginally outside the range -1.0 to 1.0; which in turn causes i.asin() to return NaN.

A simple fix is to clamp the value passed to i.asin() to force it to the range -1.0 to 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant