Closed SeanCurtis-TRI closed 3 years ago
A solution has been implemented in the "leave meshes double-valued and let derivatives come in through mesh transforms" direction. The full solution will be a PR train:
MeshField
base class (polymorphic + template is a bad combination).internal::Plane
and internal::PoseHalfSpace
the ability to handle mixed scalar types.AutoDiffXd
for rigid mesh, soft half space.AutoDiffXd
for soft mesh, rigid plane.AutoDiffXd
for soft mesh, rigid mesh.AutoDiffXd
-valued ContactSurface
all the way up through QueryObject
.@amcastro-tri You've got a checkbox up above for confirming derivatives on contact forces.
The initial effort (while still benefitting from some more elaborate tests -- see #15233), is basically complete. We have credible reason for someone to try working with the derivatives in hydroelastic contact.
fyi @hongkai-dai
Although, much of the hydroelastic contact infrastructure has been coded with a templated scalar, it is not yet ready for computing contact with AutoDiff calculations. The primary reason for this is because the scalars haven't been properly applied.
For example, one long-lived comment discusses the fact that for a given soft mesh, there could be multiple different scalar types: the pose, field value, mesh vertex positions, etc. We currently load double-valued meshes (analogous to all of the "parameterized" geometries). But introducing AutoDiff-valued transforms would produce an AutoDiff-valued
ContactSurface
.In addition, there is no value for a bounding volume hierarchy (
Bvh
) in being anything but double-valued. Other than being used for acceleration of the query, it doesn't contribute to numerical results. But we need to be able to build aBvh
for aT
-valued mesh.There are several possible solutions:
The exact solution still needs to be determined. The proof that it is done, is that we can perform AutoDiff-valued hydroelastiic contact queries (with, at least, AutoDiff-valued pose data).