graspit_interface icon indicating copy to clipboard operation
graspit_interface copied to clipboard

Graspit! memory leak

Open jvarley opened this issue 8 years ago • 2 comments

if clearWorld and importGraspableBody and import Hand are called repeatably, there is a memory leak somewhere. I would assume something from the body or hand is not being destroyed properly.

@JSR694 watch for this as well.

jvarley avatar Aug 08 '16 17:08 jvarley

I might be experiencing this too. I am trying to collect a bunch of grasps for an object from various approach vectors. Here is my pseudocode:

clearWorld()
loadWorld(world_name)  # contains only a graspableBody and a Robot
toggleAllCollisions(True)
for approach_vector in approach_vectors:
  clearWorld()
  loadWorld(world_name)
  pose = pose_from_approach_vector(approach_vector)
  setRobotPose(pose)
  grasps = planGrasps(search_energy='CONTACT_ENERGY', 
    search_space=SearchSpace(SearchSpace.SPACE_APPROACH)).grasps
  save_grasps(grasps)

I find that the Graspit! Interface hangs after a while and becomes unresponsive to mouse-controlled zooming and panning. htop doesn't show exceptionally high memory usage, though. The graspit process was consuming all of a CPU core.

Do you have a better suggested way of going about it? Thanks!

samarth-robo avatar Jul 08 '18 20:07 samarth-robo

It seems like my case was an instance of "Neighbor gen loops" as mentioned in https://github.com/graspit-simulator/graspit/issues/131, not a memory leak.

samarth-robo avatar Jul 08 '18 22:07 samarth-robo