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

How to retrieve contact normal vectors for collisions (Possibly via SDF gradient)? #273

Open
junny-kim opened this issue Dec 23, 2024 · 1 comment

Comments

@junny-kim
Copy link

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.

@junny-kim junny-kim changed the title Question: How to retrieve contact normal vectors for collisions (Possibly via SDF gradient)? Body: How to retrieve contact normal vectors for collisions (Possibly via SDF gradient)? Dec 23, 2024
@wangyian-me
Copy link
Collaborator

There's a function here drawing visualizing rigid contacts. contact_data.normal reflect the normal of this contact pair.

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

No branches or pull requests

2 participants