Hi!
I have an octomap with change node detection enabled, and I'm trying to iterate over the changed nodes and do various things with them. As part of this, I need the size of the changed nodes.
From the change keys iterator (KeyBoolMap::const_iterator), I get the OcTreeKey (it->first), and from that I can search the tree and get the OcTreeNode. But there doesn't appear to be any way, from either of those, to find out the depth/size of that node.
Since the search function actually figures out the depth of the found node in the process of finding it, I patched the search function to return the depth of the found node. Patch attached. I didn't update all the corresponding search functions, wanted to run this by the mailing list first.
I'm interested in feedback - am I missing something obvious? Am I going down the right path? Is there a better way?
Thanks,
Pete