Open3D
                                
                                
                                
                                    Open3D copied to clipboard
                            
                            
                            
                        Fixed an issue in EstimateRange
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:

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.
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.
I also added a commit to store the allocated buffer to avoid a re-allocation for that fragment buffer each call into raycast
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.
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.
Is there anything more I need to do in this and #5304 to get them merged or is it still in review?
Could you please fix the style? make apply-style will automatically do the trick.
@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?
@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.
Hi I'm facing a similar issue. will this solution (or any other) be merged into the latest version? @yuecideng
@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.
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