For two geometries that are just touching (i.e., distance = 0), the underlying code can guarantee a correct value for nhat_BA_W only when one geometry is a sphere, and the other geometry is a sphere, a box, or a cylinder. Otherwise, the underlying code is not in place yet to guarantee a correct value for nhat_BA_W when surfaces are just touching, and the vector will be populated by NaN values.
This should probably be added to as a comment to geom_geom_collider for people who might consider using it with shapes other than spheres.
We are currently using
nhat_BA_W
ingeom_geom_collider
, there is this warning (https://drake.mit.edu/doxygen_cxx/structdrake_1_1geometry_1_1_signed_distance_pair.html):For two geometries that are just touching (i.e., distance = 0), the underlying code can guarantee a correct value for
nhat_BA_W
only when one geometry is a sphere, and the other geometry is a sphere, a box, or a cylinder. Otherwise, the underlying code is not in place yet to guarantee a correct value fornhat_BA_W
when surfaces are just touching, and the vector will be populated by NaN values.This should probably be added to as a comment to
geom_geom_collider
for people who might consider using it with shapes other than spheres.