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

feat: rework solver parameters to make it easy to recover the old behaviors #581

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

sebcrozet
Copy link
Member

#579 introduced a new non-linear velocity-based constraints solver. This PR reworks the way solver iterations are specified so that some combination of them lets us recover the old solver’s behavior. This is mostly for comparison purpose or for case where the small performance hit of the new solver isn’t acceptable to the user.

  • IntegrationParameters::num_friction_iteration_per_solver_iteration is replaced by IntegrationParameters::num_additional_friction_iteration. This specifies how many extra friction iteration we want to run during the final solver iteration.
  • IntegrationParameters::num_internal_pgs_iterations indicates how many PGS iteration needs to be run within each solver iteration. Setting this value to 4 and IntegrationParameters::num_solver_iterations to 1 is equivalent to Rapier’s old solver.

For convenience, the following methods were added:

  • IntegrationParameters::switch_to_standard_pgs_solver to switch to the previous solver.
  • IntegrationParameters::switch_to_small_steps_pgs_solver to switch by to the new solver.

 The new solver is remains the default.

@sebcrozet sebcrozet merged commit 51f5bd6 into master Jan 24, 2024
5 checks passed
@sebcrozet sebcrozet deleted the solver-pick branch January 24, 2024 21:19
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.

1 participant