The Isaac gym simulation gets slower and slower when I call gym.set_dof_state_tensor(sim, True) every a few steps

I am using Isaac gym to do sampling based motion planning.

I need to reset the simulation with current robot states every control loop. Then I found that the time used for every simulation step becomes larger and larger. Could you give some suggestions to solve this issues?

I’ve played around with Isaac Gym a bit, and I know that performance issues can be pretty frustrating when you’re dealing with real-time simulations, especially something as complex as motion planning.

Your problem sounds a bit like a memory leak or maybe some sort of inefficiency in the loop. Have you tried profiling the code to see where the bottleneck is? Identifying that could really help you understand what’s going on.

Also, how are you resetting the simulation? If it involves re-initializing a lot of variables or resources, that could be what’s slowing it down over time. You might want to look into ways to reset the simulation state without having to reload everything from scratch.

Another point to consider is whether you’re using any parallelization techniques or not. With something as intensive as a control loop in motion planning, utilizing parallel processing could offer a significant speedup.