Closed queenxy closed 1 year ago
The error occurs in line 499 in brax.geometry.contact.py
tx_i = x.take(geom_i.link_idx).vmap().do(geom_i.transform)
the link_idx is None for all the arena. This is caused in brax.io.mjcf.py, line 348
'link_idx': mj.geom_bodyid[i] - 1 if mj.geom_bodyid[i] > 0 else None,
so i wonder how can i fix the arena on the ground and turn on the collision detection at the same time.
Hi @queenxy, thanks for using Brax! For the arena, I believe you'd want contype="1" conaffinity="0"
since you don't want the arena colliding with itself
We'll create a fix this so that it doesn't crash, world geoms are static and wouldn't be colliding with each other anyways
I want to create a robot soccer env in braxv2, but got some error. The error occurs because I set conaffinity=contype=1 for the arena, when I set them to 0, the error will disappear, but the ball will get through the arena. This is my xml:
And this is the error i got: