-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Fix rendering of pointclouds in PCLVisualizer
#4067
Fix rendering of pointclouds in PCLVisualizer
#4067
Conversation
This is not a guarantee (and stated explicitly in PCL's codebase)
In future maybe. I don't have any plans for that right now.
The leak was needed, as in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It's simpler even.
Adding to milestone since it is a fix to regression in a key feature (and PCL 1.11.1 isn't planned, at least right now) |
So best to keep the single copy for each component I guess.
Oki, I won't overthink this then and keep it as is.
Yes, the 0 (save) indicates that the array should be deleted by VTK. Also, since no delete method is explicit set (overload of I'm unsure exactly how VTK expands its array, with the AddNextTuple vs. us allocating the full array, so a benchmark would have been nice :) But yes, I also think its simpler to read now. There are places in the color handles that has the same procedure, which could be simplified, though again I'm not sure if it gives a small performance/memory degradation. |
I think if it adds a point, which there is no space for, it increase its array with 1 / numberofcomponents, which is 3 (XYZ), ie 1/3 of its current index count, each time it expands its array. Maybe, go back to the array/malloc approach. |
Fixed it, with adding call to |
db21a42
to
20d0efd
Compare
Confirmed to fix #4040 on osx. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the variable scope thing is addressed feel free to merge.
f89ca7b
to
c2675cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending CI
PCLVisualizer
Fixes #4040.
The culprit was the "memory leak" fixed in #3687.
Note:
Can we in some way avoid the memcpy - or maybe concatenate them to a single copy?
The XYZ will always be aligned?
Are we preparing to change at compile time, the underlaying datatype, ie. switch between float and double. Then this would require a bit more revamp I guess :)