OctoMap / octomap

An Efficient Probabilistic 3D Mapping Framework Based on Octrees. Contains the main OctoMap library, the viewer octovis, and dynamicEDT3D.
http://octomap.github.io
1.96k stars 659 forks source link

Unable to get free space #182

Open 4sfaloth opened 7 years ago

4sfaloth commented 7 years ago

I am facing this weird issue which I'm not sure if it's visualization (ie: octovis) related or not. I am generating occupancy maps using insertPointCloud function. Now, if I generate a very small map (eg: just 10 scans) then I can open it on Octovis and see both the occupied and the free space, and they seem to be correct. However, if I make a larger map (either by rotating in place or moving) then I can only visualize the occupied space in Octovis; free space appears to be empty.

Is there any known issue which could cause this? Is there a way for me to check if the tree is being stored correct, to confirm if the issue is in octovis only?

ahornung commented 7 years ago

This could be a visualization issue, maybe the number of free voxels is too large to display. Octovis displays the number of voxels. You could use that number to check if everything is integrated correctly, or write a small program that reads a .ot file and prints the statistics.

peiyunh commented 5 years ago

I run into this issue as well. With 100k points, octovis fails to display free voxels. Once I cut it down to 20k, octovis starts cooperating. Does anyone by any chance know a workaround?

ahornung commented 5 years ago

How many free nodes does your octree have? In contrast to the efficient octree encoding, the visualization needs a lot of memory for them.

The workaround is not to display the free space for large octree, or change the visualization resolution ("tree depth cutoff"). I'm pretty sure that the rendering can also be improved for memory efficiency, given someone wants to look deep into the code.

peiyunh commented 5 years ago

Thanks for following up. I believe in my case there were more than 2 million free nodes when octovis stopped working. I ended up building another octree with a 2x larger voxel size just for the purpose of visualization.