Skip to content

[multibody] Add IcfPartition, toward implementing constraint islands#24635

Open
rpoyner-tri wants to merge 1 commit into
RobotLocomotion:masterfrom
rpoyner-tri:icf-partition
Open

[multibody] Add IcfPartition, toward implementing constraint islands#24635
rpoyner-tri wants to merge 1 commit into
RobotLocomotion:masterfrom
rpoyner-tri:icf-partition

Conversation

@rpoyner-tri

@rpoyner-tri rpoyner-tri commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Toward #23755.


This change is Reviewable

@rpoyner-tri rpoyner-tri added the release notes: none This pull request should not be mentioned in the release notes label Jun 10, 2026

@rpoyner-tri rpoyner-tri left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

+(release notes: none)
+a:@joemasterjohn for feature review, please.
FYI @vincekurtz

@rpoyner-tri made 3 comments.
Reviewable status: 2 unresolved discussions, LGTM missing from assignee joemasterjohn, needs platform reviewer assigned, needs at least two assigned reviewers (waiting on joemasterjohn and rpoyner-tri).


-- commits line 2 at r1:
working: need coauthor credits


multibody/contact_solvers/icf/icf_partition.cc line 54 at r1 (raw file):

  // Compress the path so future queries are O(1).
  while (parent_[x] != root) {
    const int next = parent_[x];

minor: This loop body is not reached by unit tests. Should I worry?

@rpoyner-tri rpoyner-tri left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rpoyner-tri resolved 1 discussion.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee joemasterjohn, needs platform reviewer assigned, needs at least two assigned reviewers (waiting on joemasterjohn).

@rpoyner-tri rpoyner-tri left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rpoyner-tri made 1 comment and resolved 1 discussion.
Reviewable status: LGTM missing from assignee joemasterjohn, needs platform reviewer assigned, needs at least two assigned reviewers (waiting on joemasterjohn).


multibody/contact_solvers/icf/icf_partition.cc line 54 at r1 (raw file):

Previously, rpoyner-tri (Rick Poyner (rico)) wrote…

minor: This loop body is not reached by unit tests. Should I worry?

See added ForcePathCompression test.

@rpoyner-tri rpoyner-tri left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rpoyner-tri made 1 comment.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee joemasterjohn, needs platform reviewer assigned, needs at least two assigned reviewers (waiting on joemasterjohn).


multibody/contact_solvers/icf/icf_partition.cc line 21 at r3 (raw file):

  // island i, then we turn it into a prefix sum below. Items with a negative
  // island id are skipped.
  if (std::ssize(offsets_) < num_islands + 1) offsets_.resize(num_islands + 1);

nit This implementation pattern (checked resize) is kinda batty. Instead, we should just call resize() and trust the std::vector capactiy logic.

Here and throughout.

@rpoyner-tri rpoyner-tri left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rpoyner-tri resolved 1 discussion.
Reviewable status: LGTM missing from assignee joemasterjohn, needs platform reviewer assigned, needs at least two assigned reviewers (waiting on joemasterjohn).

Author: Vince Kurtz <vjkurtz@gmail.com>
Assisted-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored by: Rick Poyner <rick.poyner@tri.global>

@rpoyner-tri rpoyner-tri left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@joemasterjohn should I find another reviewer?

@rpoyner-tri made 1 comment.
Reviewable status: LGTM missing from assignee joemasterjohn, needs platform reviewer assigned, needs at least two assigned reviewers (waiting on joemasterjohn).

@joemasterjohn joemasterjohn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got caught up last week, but will take a look today.

@joemasterjohn made 1 comment.
Reviewable status: LGTM missing from assignee joemasterjohn, needs platform reviewer assigned, needs at least two assigned reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: none This pull request should not be mentioned in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants