isaac-sim / IsaacGymEnvs

Isaac Gym Reinforcement Learning Environments
Other
2.06k stars 430 forks source link

How to Properly Delete Objects in Isaac Gym #245

Open alexfrom0815 opened 1 week ago

alexfrom0815 commented 1 week ago

Issue Description

I am training reinforcement learning policies in Isaac Gym, which involves repeatedly creating and deleting objects in an open set. I noticed that Isaac Gym does not provide a direct function to delete objects based on their handle. Instead, I use the destroy_env function to delete the environment associated with each specific environment handle at the end of each episode.

Initially, this seemed to work fine, but as the algorithm runs for more episodes, I encounter the error: "contact buffer overflow detected." This suggests that the contact buffer is not being properly cleared after calling destroy_env.

Question

How should I handle this situation to ensure that objects are properly deleted in Isaac Gym, and the contact buffer is appropriately cleared?