Open osrf-migration opened 6 years ago
Original comment by Pourya Hoseini (Bitbucket: PouryaHoseini).
Yes. That one can be a related issue or not. This problem is for Gazebo 7, but that one was originally for Gazebo 6.
Anyways, for this issue the problem is clear. It looks like objects are not removed from the memory after deletion.
Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
Cleaning a model means properly cleaning up its nested models, links, joints, lights, collisions, visuals, sensors, plugins...
gzserver
and gzclient
impacted? Have you tried the server headless?A while back there was some effort to properly clean up pointers when a world is deleted, see pull request #2263 for example. It would be worth it writing similar tests for all kinds of models.
Original comment by Pourya Hoseini (Bitbucket: PouryaHoseini).
1- All my models are no more than a link, which those links have collisions and visuals. I also tested with common objects like "coke_can" or "hammer". The problem exists with all of them. For separate removal, actually, I don't know how I can remove just a part of a model during the simulation.
2- gzserver and gzclient are both affected. I tried with a headless server. The gzserver experiences the issue in that condition too.
Original comment by erwan_r1d1 (Bitbucket: erwan_r1d1).
Hi, as any progress been made on this issue ? We experience the same problem and we are in a similar situation as OP: we add and delete objects repeatedly but memory keeps increasing.
Original comment by Weihao Yuan (Bitbucket: skywhao).
Stuck in the same problem. Gazebo performance decreases and then crashes, and the memory keeps increasing. Any solution?
Do you know the root cause and can it be fixed?
Original report (archived issue) by Pourya Hoseini (Bitbucket: PouryaHoseini).
It seems there is a memory leak with Gazebo 7 (mine 7.12.0) after deleting objects. When an object is added, the memory usage goes up for gzclient and gzserver, but it does not come down after deleting the objects. It happens both through manual insertion and deletion and those via roslaunch (ROS Kinetic) too.
It can be very critical issue. For example, in my application, I insert and then delete objects repeatedly, so after a while the system goes out of memory.
My system is an Ubuntu 16.04, if it is helpful.