ethz-asl / voxblox_ground_truth

Create ground truth voxblox maps from Gazebo worlds or .ply files
BSD 2-Clause "Simplified" License
86 stars 24 forks source link

Optionally floodfill empty space, allow choice of inside of mesh being free or occupied #4

Closed helenol closed 4 years ago

helenol commented 4 years ago

Changes

Should hopefully fix https://github.com/ethz-asl/voxblox_ground_truth/issues/3

Examples on Office Mesh

Watertight mesh of 3D reconstruction of an office (MeshLab with xray shader so you can actually see the office-y bits inside): image

Behavior before (fill_inside = true floodfill_unoccupied = false): image

With fill_inside = false and floodfill_unoccupied = false image

With fill_inside = false and floodfill_unoccupied = true image

Stanford bunny with floodfill (note the error on the edge... it's a result of how we iterate over the neighbors in a lazy way rather than proper floodfill :/ ):

image

Let me know if this feature is useful then I'll fix the floodfilling edge.

helenol commented 4 years ago

Looks great Helen! Thank you for implementing this.

Regarding the flood fill, is the current problem due to the order in which you iterate over the voxels (i.e. with a triple for loop instead of propagating a wavefront from a seed point)?

Yes absolutely. Again the "lazy" way of doing it. ;) But actually can be easily fixed since you actually know that if there are no neighbors = you're outside the mesh structure, so fill_inside will tell you the value. I'll implement that before I merge.

FYI I also updated the CMakeLists to expose the targets properly for linking (using this as a library within antoher thing...)

helenol commented 4 years ago

Here's the new/fixed version, note the lack of cut-off corner: image