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

Issue with contact forces when computing r damage in strike task #7

Open
jacktheripper19 opened this issue Mar 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jacktheripper19
Copy link

Hello,

When trying to see the value of each reward term for the task of striking, I noticed that the r_damage can be triggered even when the agents are not hitting each other. After further investigation, I found that the contact buffers can also include self collision in addition to contact between different agents; for example, if an agent's hand collide with its own head it will be included in the contact buffer, therefore it will be used in the reward as if it got hit by the opponent which was not the case.

This could be solved by filtering the contact buffer by specifying the bodies involved in the contact, but I saw that this functionality is not available right now in isaacgym. The workaround I can think of is to detect first if there was contact between specific bodies by measuring the distance between them, once the distance is lower than some threshold, you assume there was contact, then you check the magnitude of the contact force.

Hope I was clear.

@ZeldaHuang
Copy link
Collaborator

@jacktheripper19 you are right,your solution will work in most situations (when the distance is lower than threshold, self damage will still be included in r_damage), feel free to create pr.

@ZeldaHuang ZeldaHuang added the bug Something isn't working label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants