Skip to content

How to fetch occupied voxels for specific resolution? #54

Closed Answered by victorreijgwart
Divelix asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Divelix, by default, the forEachLeaf method will call the lambda you give it for every leaf of the octree. These leaves will usually be at the highest resolution in areas where the occupancy is changing (e.g. around surfaces) and at a lower resolution in areas where the map is constant (e.g. in free space when the estimate has converged).
You can limit the maximum resolution for forEachLeaf by using this interface. We'll add more methods in the future to make the API more convenient, but in the meantime you could already do what you want with:

  constexpr IndexElement kMinHeight = 1;
  for (const auto& [block_index, block] : map_ptr->getBlocks()) {
    block.forEachLeaf(
        block…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by victorreijgwart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants