finding depth of changed node

21 views
Skip to first unread message

Pete Flugstad

unread,
Sep 20, 2019, 10:54:02 AM9/20/19
to oct...@googlegroups.com
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


octomap.patch
Reply all
Reply to author
Forward
0 new messages