leggedrobotics / legged_gym

Isaac Gym Environments for Legged Robots
Other
1.43k stars 390 forks source link

Training Terminated due to NaN in tensors #79

Open a6375336 opened 1 week ago

a6375336 commented 1 week ago

Describe the bug Hello everyone. First, I'd like to thank the developers of Legged Gym, with this RL implementation I have successfully trained multiple robots in the simulation environment . But a problem occurred when I introduced a new robot. During training, the robot inexplicably starts flying, followed by training termination with an error message indicating "NaN in tensors" or "ValueError". This issue has been bothering me for a long time. I have tried some methods, but it is not fully solved yet.

The methods I have tried are:

1.reset the robot when its body speed becomes too large, but this approach affects the training and sometimes causes the robot to enter a cycle of termination and restart.

  1. Checking the URDF file. I have confirmed that the velocity and effort bounds corresponding to each joint are properly limited in my URDF file. Some people online also mentioned that this issue could be caused by incorrect inertia parameters in URDF files exported from SolidWorks, but even after resetting the inertia parameters based on SolidWorks' mass inspection function, the issue remains unresolved.
  2. Adjusting the reward function: I have adjusted the reward function for a while, but this does not seem to solve the problem.

Is there any good solution for this? Thank you.

To Reproduce Steps to reproduce the behavior:

  1. Execute ./path/script arg1 arg2
  2. Then ...
  3. See error: ...

Expected behavior A clear and concise description of what you expected to happen.

System (please complete the following information):

Additional context Add any other context about the problem here.

hyspirnov commented 4 days ago

I have the same problem. Have you solved it?