Open KyleM73 opened 2 years ago
Were you able to find any fix for this?
I have the same issue with Isaacgym preview 4. I have two URDF files, A and B (I, unfortunately, cannot share the URDF files). The problem only exists when I use the URDF file A, which makes me wonder if its something to do with the URDF file that is causing NaN to appear when refresh_actor_root_state is called.
set_actor_root_state_tensor
should receive a valid tensor. Maybe it was because of unproper quaternions which w part should not be 0.
Before you call acquire_actor_root_state_tensor
you should call refresh_actor_root_state_tensor
first.
I am facing a similar issue where while training I randomly get root_state as NaN. Is there any known fix for this?
I was having the same issue with a more complex model so I wrote a simple task loading a cylinder (URDF) and dropping it onto a plane. After the first simulation step, the position and velocity of the actor come back as NaNs (after the call to refresh the actor root state tensor). By increasing controlFrequencyInv I can see that there is no instability in the physics - the cylinder falls to the ground and comes to a rest. The error is thrown from the call to the mlp, as the NaNs propagate upstream, but the NaNs first appear after refresh_actor_root_state. Why might this be happening? I follow the isaacgymenvs examples exactly, so my physics parameters are reasonable. I make sure my tensors aren't being garbage collected etc but am not sure how to debug further. Any advice would be appreciated!
Code below: