Closed mishmish66 closed 1 year ago
Hi @mishmish66 , could you provide an XML to reproduce the issue? FWIU both geom_i or geom_j can be a world geometry, but if link_idx is None, it indeed could crash later code (which we should fix if that's the case)
Hello! I am not sure if I am understanding this right, but I have created a mjcf file for the franka emika panda robot, and while debugging various issues during the process, I came across this code snippet from contact.py:
From what I understand, this is supposed to iterate through every single possible collision pair. My understanding is that geom_j is supposed to be the only one that can be stationary, and thus have no link_idx.
Because of the structure of my env, not all of my static elements had higher geom ids, so some of these pairs were (i, j) where i is stationary and has no link_idx. This crashes the later code.
A relatively easy fix which seems to work on my local machine is to replace the yield at the end with this:
Not sure if this was a known issue or if this solution would mess with the jax compile or anything, but I couldn't find it in existing issues