Skip to content

[AnimationLoop] Support static equilibrium in FreeMotionAnimationLoop - #6456

Open
alxbilger wants to merge 2 commits into
sofa-framework:masterfrom
alxbilger:staticfreemotion
Open

alxbilger wants to merge 2 commits into
sofa-framework:masterfrom
alxbilger:staticfreemotion

Conversation

@alxbilger

Copy link
Copy Markdown
Contributor

This is to support lagrangian constraints in statics problems.

The introduced example shows two types of lagrangian constraints: fixed and stopper (including a mapping chain).

statics.mp4

For statics, the constOrder must be core::ConstraintOrder::POS, which was not supported. Previously, the Data solveVelocityConstraintFirst (a bool) allowed only VEL and POS_AND_VEL. Since a third option cannot be supported by a bool, I deprecated the Data for a new one: d_constraintsStateVariables.

I also added a Data d_solveConstraints to control whether the constraint must be solved or not. If constraints are not solved, it should be equivalent to DefaultAnimationLoop.

Note: the scene has a very soft material making the difference between the unconstrained and constrained motion very large. I had to add a regularization term and a lot of Gauss-Seidel iterations. It works better with linear or corotational materials.


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@alxbilger alxbilger added pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request labels Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant