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

memory grows unbounded during calibration #112

Closed
protobits opened this issue Nov 21, 2014 · 18 comments
Closed

memory grows unbounded during calibration #112

protobits opened this issue Nov 21, 2014 · 18 comments

Comments

@protobits
Copy link

I have a problem where, during calibration, memory usage increases very fast. If I manage to avoid receiving a segmentation fault do to excessive memory usage, I see that after calibration process ends, the calibration window displays all past images captured during the calibration process.

I've looked at the code and I've seen that images are queued and I think the queue has no limit. I wonder if this is the cause. If so, the queuing should be stopped before starting calibration to avoid this problem.

@vrabaud
Copy link
Contributor

vrabaud commented Nov 22, 2014

This seems close to #97 , which version do you use ?

@protobits
Copy link
Author

I'm on 1.12.11.
Indeed it sounds like the same problem, however it looks it was not fixed.

On Sat, Nov 22, 2014 at 6:42 AM, Vincent Rabaud notifications@github.com
wrote:

This seems close to #97
#97 , which
version do you use ?


Reply to this email directly or view it on GitHub
#112 (comment)
.

@vrabaud
Copy link
Contributor

vrabaud commented Dec 14, 2014

wait, so you don't see the images during calibration ? Only once done, are all the images that were used for calibration being displayed ? Under Python 2 ?

@protobits
Copy link
Author

It is python2, yes.
After I press calibrate, no, I don't see images anymore. The images appear
to be queued (without limits) until after the process finishes. Thus, when
it is done computing the calibration, it starts playing back everything
captured while it was calibrating.

On Sun, Dec 14, 2014 at 7:40 PM, Vincent Rabaud notifications@github.com
wrote:

wait, so you don't see the images during calibration ? Only once done, are
all the images that were used for calibration being displayed ? Under
Python 2 ?


Reply to this email directly or view it on GitHub
#112 (comment)
.

@vrabaud
Copy link
Contributor

vrabaud commented Dec 14, 2014

which OS ? Are you on GNOME or KDE ?

@protobits
Copy link
Author

KDE

On Sun, Dec 14, 2014 at 8:48 PM, Vincent Rabaud notifications@github.com
wrote:

which OS ? Are you on GNOME or KDE ?


Reply to this email directly or view it on GitHub
#112 (comment)
.

vrabaud added a commit that referenced this issue Dec 21, 2014
@vrabaud
Copy link
Contributor

vrabaud commented Dec 21, 2014

can you please try master ? Thx

@protobits
Copy link
Author

Hi,
it does not seem to change. I have to shutdown the camera node so that it
doesn't feeds images to the calibrator. Also, the calibrator does not
display images while calibrating (hence the queue going out of bounds).
I suspect a threading issue which does not allow consuming said queue.

On Sun, Dec 21, 2014 at 5:27 PM, Vincent Rabaud notifications@github.com
wrote:

can you please try master ? Thx


Reply to this email directly or view it on GitHub
#112 (comment)
.

@vrabaud
Copy link
Contributor

vrabaud commented Feb 13, 2015

ok, could you please try to increase the value of 6ms to 10, 20 or 30 here:
https://github.com/ros-perception/image_pipeline/blob/indigo/camera_calibration/nodes/cameracalibrator.py#L75
If any of those work (to display things at least), please let me know.

@vrabaud
Copy link
Contributor

vrabaud commented Feb 15, 2015

can you please give more info ? OS, camera. I really cannot reproduce that on 3 versions of Kubuntu ...
Do you have your own OpenCV by any chance ? Anything you compiled from source ?

@protobits
Copy link
Author

I'm on ArchLinux, have tried with pointgrey firefly mv cameras (using
camera1394 driver). I should not be using anything compiled by source. When
I tried latest version I did it on a separate clean catkin workspace.
I will try your suggestion sometime next week.

On Sun, Feb 15, 2015 at 11:19 AM, Vincent Rabaud notifications@github.com
wrote:

can you please give more info ? OS, camera. I really cannot reproduce that
on 3 versions of Kubuntu ...
Do you have your own OpenCV by any chance ? Anything you compiled from
source ?


Reply to this email directly or view it on GitHub
#112 (comment)
.

@vrabaud
Copy link
Contributor

vrabaud commented Feb 15, 2015

which version of KDE ? I tried the latest 4 and 5.
It's just that the code should definitely display something: that stupid queue is being filled (that's why your memory increases), but somehow, it cannot display any image. You could simply put a print in that while loop I mentioned to see if it even gets there or pops out an image.

@protobits
Copy link
Author

Ok, I will try that as well at work, where I can try this.

I'll let you know any results.
Thanks!

On Sun, Feb 15, 2015 at 11:24 AM, Vincent Rabaud notifications@github.com
wrote:

which version of KDE ? I tried the latest 4 and 5.
It's just that the code should definitely display something: that stupid
queue is being filled (that's why your memory increases), but somehow, it
cannot display any image. You could simply put a print in that while loop I
mentioned to see if it even gets there or pops out an image.


Reply to this email directly or view it on GitHub
#112 (comment)
.

@vrabaud
Copy link
Contributor

vrabaud commented Mar 15, 2015

btw, do you have a custom version of OpenCV in /usr/local or somewhere else ?

@protobits
Copy link
Author

No, stock opencv from archlinux.

On Sun, Mar 15, 2015 at 12:39 PM, Vincent Rabaud notifications@github.com
wrote:

btw, do you have a custom version of OpenCV in /usr/local or somewhere
else ?


Reply to this email directly or view it on GitHub
#112 (comment)
.

@bobbens
Copy link

bobbens commented Mar 19, 2015

I'm seeing the same issue. From looking at the code it seems like it's basically the queue growing towards infinity. Best solution would be add a parameter that specifies how large the queue can grow before it just starts removing old images.

@vrabaud
Copy link
Contributor

vrabaud commented Mar 23, 2015

can anybody please try master on indigo and let us know if that now works ? Thx

@vrabaud
Copy link
Contributor

vrabaud commented Mar 29, 2015

ok, I'll asume it's fixed in master.

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

No branches or pull requests

3 participants