Skip to content

Conversation

@vincekurtz
Copy link
Contributor

@vincekurtz vincekurtz commented Nov 13, 2025

Addresses trailing issue from #23747 (#23782).

Now:

  • The IcfSolverParams.min_tolerance parameter does influence error control mode, as a lower bound on kappa * accuracy
  • The actual tolerance is passed to SolveWithGuess, so the integrator doesn't change the parameters as it goes

This change is Reviewable

Copy link
Contributor Author

@vincekurtz vincekurtz left a comment

Choose a reason for hiding this comment

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

+a:@amcastro-tri for mini-review please!

Reviewable status: LGTM missing from assignee amcastro-tri, needs platform reviewer assigned, needs at least two assigned reviewers, missing label for release notes (waiting on @vincekurtz)

Copy link
Contributor

@amcastro-tri amcastro-tri left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, LGTM missing from assignee amcastro-tri, needs platform reviewer assigned, needs at least two assigned reviewers, missing label for release notes (waiting on @vincekurtz)


multibody/contact_solvers/icf/icf_solver.h line 34 at r1 (raw file):

  This provides a lower bound on the actual tolerance used, which is specified
  explicitly when calling the solver. CENIC uses this minimum tolerance in fixed
  step mode, and relaxes it in error-controlled mode based on the desired

I see what your arer trying to do. Consider this lands in Drake.
SInce you want to allow users to specify IcSolverfParams for CenicIntegrator, that means that this class, IcSolverfParms is public. However, this whole thing is internal::.
How do you consolidate that? Maybe we consider the ConvexIntegrator::set_parameters() and internal::) API ony? But you can see how this still has the same problems. Obviously it gets the job done, but from an API design perspective something went wrong.

I do like this, and I think we should merge it. But still, I believe we might want a separate public struct for CenicIntegrator params.
WDYT?

Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, LGTM missing from assignee amcastro-tri, needs platform reviewer assigned, needs at least two assigned reviewers, missing label for release notes (waiting on @vincekurtz)


multibody/contact_solvers/icf/icf_solver.h line 34 at r1 (raw file):

Previously, amcastro-tri (Alejandro Castro) wrote…

I see what your arer trying to do. Consider this lands in Drake.
SInce you want to allow users to specify IcSolverfParams for CenicIntegrator, that means that this class, IcSolverfParms is public. However, this whole thing is internal::.
How do you consolidate that? Maybe we consider the ConvexIntegrator::set_parameters() and internal::) API ony? But you can see how this still has the same problems. Obviously it gets the job done, but from an API design perspective something went wrong.

I do like this, and I think we should merge it. But still, I believe we might want a separate public struct for CenicIntegrator params.
WDYT?

The struct that's used by end-users should be defined its own separate header file, in a non-internal namespace.

Copy link
Contributor Author

@vincekurtz vincekurtz left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, LGTM missing from assignee amcastro-tri, needs platform reviewer assigned, needs at least two assigned reviewers, missing label for release notes (waiting on @vincekurtz)


multibody/contact_solvers/icf/icf_solver.h line 34 at r1 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

The struct that's used by end-users should be defined its own separate header file, in a non-internal namespace.

I think we should expose all of these parameters to the end user, so how about we just make IcfSolverParameters public (move to a separate file, namespace, etc.)?

Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, LGTM missing from assignee amcastro-tri, needs platform reviewer assigned, needs at least two assigned reviewers, commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @vincekurtz)


multibody/contact_solvers/icf/icf_solver.h line 34 at r1 (raw file):

Previously, vincekurtz (Vince Kurtz) wrote…

I think we should expose all of these parameters to the end user, so how about we just make IcfSolverParameters public (move to a separate file, namespace, etc.)?

Perhaps to state the obvious, but yes I agree. This is waiting on @amcastro-tri to weigh in.

@vincekurtz
Copy link
Contributor Author

multibody/contact_solvers/icf/icf_solver.h line 34 at r1 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

Perhaps to state the obvious, but yes I agree. This is waiting on @amcastro-tri to weigh in.

I just went ahead and moved it. Should this have doxygen-style comments (///, /**) now that it's public?

Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, LGTM missing from assignee amcastro-tri, needs platform reviewer assigned, needs at least two assigned reviewers, commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @vincekurtz)


multibody/contact_solvers/icf/icf_solver.h line 34 at r1 (raw file):

Previously, vincekurtz (Vince Kurtz) wrote…

I just went ahead and moved it. Should this have doxygen-style comments (///, /**) now that it's public?

Yes; typically /**.

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.

3 participants