AndreiBarsan / DynSLAM

Master's Thesis on Simultaneous Localization and Mapping in dynamic environments. Separately reconstructs both the static environment and the dynamic objects from it, such as cars.
BSD 3-Clause "New" or "Revised" License
576 stars 179 forks source link

VisibleEntryIDs => VisibleBlockCoords #19

Closed AndreiBarsan closed 7 years ago

AndreiBarsan commented 7 years ago

Despite (slightly) increasing its memory footprint, this would make the engine much more robust (witch cleaner code) to decaying voxel blocks.

Instead of referencing visible entries by their absolute hashTable location, which is brittle once we start moving things around as we're deleting entries, we can keep track of the full coords of the visible blocks, and simply re-look them up in the hash table when necessary, eliminating the problem of stale pointers to deallocated buckets, save for the case where a bucket is completely emptied out, a case which is trivial to detect in the code.

AndreiBarsan commented 7 years ago

I've implemented this in a basic manner on a separate branch. Seems to work OK on a vanilla map. Takes longer (~4ms vs 2ms for fusion), but that shouldn't be a major issue for our use case.

Remaining tasks:

Note: if it takes more than a day in total DROP THIS TASK. Time is limited, and having only cosmetic voxel decay is enough for our purposes.

AndreiBarsan commented 7 years ago

Ok, I seem to have solved all the GC issues while working on this. Running the final cuda-memcheck now, and then I'll merge this to master.