Genesis
Genesis copied to clipboard
How to retrieve contact normal vectors for collisions (Possibly via SDF gradient)?
We want to retrieve the contact normal vector at each contact point. Currently, the contact information includes geom_a, geom_b, link_a, link_b, positions, and forces, but not the contact normal. The direction of the normal is often crucial for tasks like manipulation, friction modeling, or force distribution.
Is there a built-in way to access contact normals? If the geometry is stored or represented via a Signed Distance Function (SDF), it seems possible to compute the local surface normal from the gradient of the SDF at the contact point. However, I haven’t found a direct API for that.
Is there a recommended approach or workaround to obtaining the contact normal? If so, could you point us toward any relevant documentation or methods? If not, do you have plans to expose the contact normal in a future release? Any guidance is appreciated.
There's a function here drawing visualizing rigid contacts. contact_data.normal reflect the normal of this contact pair.