Skip to content

Fix tangent impulse being NaN #842

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Vrixyz
Copy link
Contributor

@Vrixyz Vrixyz commented Jun 11, 2025

@@ -162,6 +162,7 @@ impl OneBodyConstraintBuilder {
{
constraint.elements[k].tangent_part.impulse =
manifold_point.warmstart_tangent_impulse;
constraint.elements[k].tangent_part.impulse_accumulator = na::zero();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two body constraints and generic body constraints may benefit from the same reset. Also, a deconstructing pattern may help with making sure we don't forget to reset any fields.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same should be done for Simd constraints, as the impulse accumulators in the tangent part are also never re-set from NaN

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.

incorrect tangent_impulse reported by contact graph
2 participants