Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

Fixed an issue in EstimateRange

Open jdavidberger opened this issue 3 years ago • 9 comments

This also gracefully handles the preallocated buffer being too small and adds a heuristic which estimates the number of fragments needed.

This is the bug responsible for #5344 and fixes that issue absolutely:

From GPU: image

The reason it didn't trigger on lower voxel sizes is that with a small enough voxel size, each reprojection only took 1 fragment anyway.


This change is Reviewable

jdavidberger avatar Jul 25 '22 19:07 jdavidberger

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

update-docs[bot] avatar Jul 25 '22 19:07 update-docs[bot]

I also added a commit to store the allocated buffer to avoid a re-allocation for that fragment buffer each call into raycast

jdavidberger avatar Jul 25 '22 20:07 jdavidberger

The main issue with this is thread safety. As is it's not particularly thread safe but if you lock properly around the VoxelGrid it would be; here if you have two voxelgrids churning it'll have issues. So I'd say this is workable with thread_local and just let each thread have one.

Are there CI checks for memory leaks? Because this would flag that there since it technically is a memory leak.

jdavidberger avatar Jul 26 '22 16:07 jdavidberger

Thanks for pointing it out, I haven't considered multi-thread usages. To the best of my knowledge there is no such check in the CI. Then I think it is ready to merge. It would be beneficial to have the member variable separated from the data structure and keep it in the SLAM module, but it was initially my design flaw that entangles them so probably it should be me to upgrade this part later.

theNded avatar Jul 26 '22 16:07 theNded

Is there anything more I need to do in this and #5304 to get them merged or is it still in review?

jdavidberger avatar Jul 30 '22 19:07 jdavidberger

Could you please fix the style? make apply-style will automatically do the trick.

theNded avatar Jul 31 '22 01:07 theNded

@yuecideng could you please take a look at what may have triggered the issue in unit test on windows, if you have the environment and bandwidth?

theNded avatar Aug 02 '22 19:08 theNded

@yuecideng could you please take a look at what may have triggered the issue in unit test on windows, if you have the environment and bandwidth?

Sure, I will try it.

yuecideng avatar Aug 03 '22 02:08 yuecideng

Hi I'm facing a similar issue. will this solution (or any other) be merged into the latest version? @yuecideng

nfrankisrg avatar Aug 08 '22 10:08 nfrankisrg

@nfrankisrg I forget to submit my review. Sorry for the lately response. Now the ci is no problem, and I think it would be merged to master soom.

yuecideng avatar Aug 25 '22 10:08 yuecideng

after the recent change I'm unable to create a VoxelBlockGrid with device = CUDA:0 or transfer the CPU one to the GPU using .cuda or .to

nfrankisrg avatar Sep 05 '22 12:09 nfrankisrg