Hi Sandip,
>
> If I have the (x,y,z, occupancyValue, depth), can I do the following
> and will it be right:
>
> 1. setNodeValue(x,y,z, occupancyValue) --> sets the occupancy at the
> maxDepth (16)
> 2. search(x,y,z, depth) ---> returns the node at that depth (which now
> got created as we inserted/updated value of one of its children)
> 3. node->setLogOdds(logodds(occupancyValue));
>
> Question1: Am I correct in assuming in STEP 2? this should not return
> "NULL" right?
That's correct. Step 1 already returns a NODE*, so the result is usually
identical. The automatic pruning could interfere in a way that after
setNodeValue, 8 children share an identical value and get pruned to only
one parent node, which search will then return.
>
> Question2: Step 3 force update all the children nodes of the node (not
> at the lower depth) - am I correct?
No, setLogOdds(...) simply assigns the value to the Node:
https://github.com/OctoMap/octomap/blob/devel/octomap/include/octomap/OcTreeNode.h#L70
Best,
Armin