Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increasing memory consumption iteratively creating and deleting camera nodes #6696

Open
msminirobot opened this issue Nov 13, 2024 · 2 comments

Comments

@msminirobot
Copy link

msminirobot commented Nov 13, 2024

Describe the Bug
In an evolutionary robotics setting, I create new robot nodes iteratively and delete the old ones using a supervisor node. Over time, the memory consumption increases up to very high levels (> 30 GB). Isolating the other elements of my robots, I notice the memory increase only when enabling a camera device

camera = robot.getDevice('rgb_camera')
camera.enable(params.TIME_STEP)

Steps to Reproduce

  1. Create robot node with camera using a supervisor node
  2. Delete the robot node with the supervisor
  3. Create a new supervisor node
  4. Repeat steps 1-3 iteratively, you will see the memory usage of Webots increasing over time

Expected behavior
Memory consumption does not increase continuously.

System

  • Operating System: macOS 15.0.1
  • Python 3.12

Additional context
Add any other context about the problem here.

@austingreisman
Copy link

Sounds like a memory leak (I'm not a contributor, but use Webots). Is it possible for you to use the camera.disable() method before deconstruction to see if that "fixes" the issue?

@msminirobot
Copy link
Author

Yes, this is a memory leak. However, I don't know which part of the camera node it exactly causes.

Using disable, deleting camera object and/or robot node doesn't help. I tried all of those combinations and my guess is that there is something not properly removed by the destructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants