google / brax

Massively parallel rigidbody physics simulation on accelerator hardware.
Apache License 2.0
2.33k stars 255 forks source link

Bodies seem to repel each other even though no collision in config #284

Closed Theo-Cheynel closed 1 year ago

Theo-Cheynel commented 1 year ago

Hi,

I have a config file defining a humanoid ragdoll. I have removed all of the collisions inside this config. I expected the bodies to be able to intersect each other, instead, here's a video of their behaviour :

https://user-images.githubusercontent.com/34627497/210821915-f13a7056-6712-4e31-89cd-2f8eaf14e030.mp4

I am just applying a predefined series of actions at each step and observing the result, and we can see that they behave like they're repulsing each other so as not to collide, despite the collisions being turned off.

Does anyone know what is happening ? If necessary I can provide the config used and the script used to generate that result, as well as the data.

btaba commented 1 year ago

Hi @Theo-Cheynel ! It looks to me like the capsules are interpenetrating without a collision update. To confirm, can you check system.colliders to make sure it's empty? https://github.com/google/brax/blob/main/brax/physics/config.proto#L103-L104