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

WIP [geometry] ComputeSignedDistanceToPoint for meshes #21471

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DamrongGuoy
Copy link
Contributor

@DamrongGuoy DamrongGuoy commented May 22, 2024

Propose document. Don't merge until the supporting code is ready.

We need two tasks:


This change is Reviewable

@DamrongGuoy DamrongGuoy added status: do not merge release notes: feature This pull request contains a new feature labels May 22, 2024
@jwnimmer-tri
Copy link
Collaborator

I'll also mark it +(status: do not review) since we're not seeking the official code review now, we're just pinging specific people to check the overall idea. This placates the https://drake.mit.edu/platform_reviewer_checklist.html needs-attention report.

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 jwnimmer-tri(platform), needs at least two assigned reviewers, labeled "do not merge" (waiting on @DamrongGuoy)


geometry/query_object.h line 747 at r1 (raw file):

       is to the high curvature area, the bigger the effect. It is not
       immediately clear how much worse the answer will get.
   - ᶜ Support only compliant hydroelastic tetrahedral meshes (VTK files).

The details of (c) are unclear in several ways:

(1) When the file does not meet this criterion, what happens? Does it throw, or ignore like note (a)?

(2) For supported meshes, is the distance (and grad) measured to the convex hull of the geometry (like point contact), or does it allow for non-convexity (like a hydro surface)?

(3) It says "compliant hydro tet mesh". Are we trying to exclude rigid hydro tet meshes? I'm not sure why the hydroelastic details should come into play here. My intuition is that "vtk tet mesh" should be the only criterion? Why does the compliance matter for a signed-distance?

@DamrongGuoy DamrongGuoy force-pushed the doc_mesh_signed_distance_to_point branch from c33fff4 to 03421f9 Compare June 5, 2024 18:24
Copy link
Contributor Author

@DamrongGuoy DamrongGuoy 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 jwnimmer-tri(platform), needs at least two assigned reviewers, labeled "do not merge"


geometry/query_object.h line 747 at r1 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

The details of (c) are unclear in several ways:

(1) When the file does not meet this criterion, what happens? Does it throw, or ignore like note (a)?

(2) For supported meshes, is the distance (and grad) measured to the convex hull of the geometry (like point contact), or does it allow for non-convexity (like a hydro surface)?

(3) It says "compliant hydro tet mesh". Are we trying to exclude rigid hydro tet meshes? I'm not sure why the hydroelastic details should come into play here. My intuition is that "vtk tet mesh" should be the only criterion? Why does the compliance matter for a signed-distance?

Thanks for asking. I hope it's clearer now.

I agree that it's independent of hydroelastics.

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.

This seems aimed in the right direction to me.

\CC @SeanCurtis-TRI in case you want to weigh in, or check with me on any details.

Reviewable status: LGTM missing from assignee jwnimmer-tri(platform), needs at least two assigned reviewers, labeled "do not merge" (waiting on @DamrongGuoy)


geometry/query_object.h line 747 at r1 (raw file):

Previously, DamrongGuoy (Damrong Guoy) wrote…

Thanks for asking. I hope it's clearer now.

I agree that it's independent of hydroelastics.

Thanks!

Copy link
Contributor

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: 2 unresolved discussions, LGTM missing from assignee jwnimmer-tri(platform), needs at least two assigned reviewers, labeled "do not merge" (waiting on @DamrongGuoy)


geometry/query_object.h line 747 at r2 (raw file):

       is to the high curvature area, the bigger the effect. It is not
       immediately clear how much worse the answer will get.
   - ᶜ Support only tetrahedral meshes in VTK files. Unsupported meshes are

Grammar

Suggestion:

Only tetrahedral meshes in VTK files are supported.

geometry/query_object.h line 748 at r2 (raw file):

       immediately clear how much worse the answer will get.
   - ᶜ Support only tetrahedral meshes in VTK files. Unsupported meshes are
       simply ignored; no results are reported for that geometry. The signed

BTW Given that the mesh has the potential (possibly even high probability) of being non-convex, it feels like the documentation, overall, should emphasize that in these cases, not only can the gradient be discontinuous, but the witness point can also be discontinuous (a property that has not hitherto been at risk with the previous convex shapes).

@jwnimmer-tri jwnimmer-tri removed their assignment Jun 7, 2024
@DamrongGuoy DamrongGuoy changed the title WIP [geometry] ComputeSignedDistanceToPoint for compliant-hydroelastic tetrahedral meshes WIP [geometry] ComputeSignedDistanceToPoint for tetrahedral meshes Jun 13, 2024
@DamrongGuoy DamrongGuoy force-pushed the doc_mesh_signed_distance_to_point branch from 03421f9 to f4a9bf4 Compare July 25, 2024 04:28
@DamrongGuoy DamrongGuoy changed the title WIP [geometry] ComputeSignedDistanceToPoint for tetrahedral meshes WIP [geometry] ComputeSignedDistanceToPoint for meshes Jul 25, 2024
Copy link
Contributor Author

@DamrongGuoy DamrongGuoy 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, needs platform reviewer assigned, needs at least two assigned reviewers, labeled "do not merge"


geometry/query_object.h line 747 at r2 (raw file):

Previously, SeanCurtis-TRI (Sean Curtis) wrote…

Grammar

Done below.


geometry/query_object.h line 748 at r2 (raw file):

Previously, SeanCurtis-TRI (Sean Curtis) wrote…

BTW Given that the mesh has the potential (possibly even high probability) of being non-convex, it feels like the documentation, overall, should emphasize that in these cases, not only can the gradient be discontinuous, but the witness point can also be discontinuous (a property that has not hitherto been at risk with the previous convex shapes).

Done.

(Side note: Convex() can also have discontinuous witness points and gradients. For example, the center of a regular polyhedron has multiple witness points and gradients. All Shape subclasses, except HalfSpace, have discontinuous witness points at their centers or medial axes.)

@DamrongGuoy DamrongGuoy force-pushed the doc_mesh_signed_distance_to_point branch from f4a9bf4 to 54fb3a6 Compare July 25, 2024 04:50
Copy link
Contributor Author

@DamrongGuoy DamrongGuoy 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: 2 unresolved discussions, needs platform reviewer assigned, needs at least two assigned reviewers, labeled "do not merge"

a discussion (no related file):
@calderpg-tri could you please confirm this feature is what you'd like? The actual computations are in other PRs that I'm still working on. This PR is only documentation.


Copy link
Contributor

@calderpg-tri calderpg-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: 2 unresolved discussions, needs platform reviewer assigned, needs at least two assigned reviewers, labeled "do not merge" (waiting on @DamrongGuoy)

a discussion (no related file):

Previously, DamrongGuoy (Damrong Guoy) wrote…

@calderpg-tri could you please confirm this feature is what you'd like? The actual computations are in other PRs that I'm still working on. This PR is only documentation.

Yes, signed distance queries against convex hull of Convex shapes and surface of Mesh shapes (with appropriate mesh files) is what I'm looking for.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants