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

Open
chrisdunelm opened this issue Sep 21, 2024 · 0 comments · May be fixed by #736
Open

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

chrisdunelm opened this issue Sep 21, 2024 · 0 comments · May be fixed by #736

Comments

@chrisdunelm
Copy link

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

chrisdunelm added a commit to chrisdunelm/rapier that referenced this issue Sep 21, 2024
@chrisdunelm chrisdunelm linked a pull request Sep 21, 2024 that will close this issue
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