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

Use eigen to compute angle between vertex normals to avoid nans #246

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

mlanighan
Copy link
Contributor

This PR resolves a lingering item with #76 that caused downstream issues in FCL with certain meshes that spewed
eigen: too many iterations in Jacobi transform.

As hinted by flexible-collision-library/fcl#190, we tracked this down to nans being introduced due to floating point imprecision in line 551
return std::acos(vec1.dot(vec2) / (vec1_norm * vec2_norm));

Rather than introduce guards to sanitize input/output, use eigen to compute the angle directly-in our internal testing the error with FCL no longer appears with this change.

When this is accepted we can incorporate the fix into #240

@rhaschke rhaschke merged commit 9f88a1b into moveit:noetic-devel Jul 17, 2024
5 checks passed
@mlanighan mlanighan deleted the hotfix/acos-arg branch July 17, 2024 19:12
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 this pull request may close these issues.

2 participants