Update node back to unknown in octomap
When a scan from a sensor is inserted into an octomap the nodes of the octree are updated. Depending on a sensor hit or miss the occupancy probability, initialized at 0.5, changes. According to the default values, the probability of a node being occupied is 0.7 and of a node being free is 0.4. So if a node has been reported as free a number of times it is marked as free. Now I'm interested in lowering the probability of a node being free as time passes by and no measurement has been received. Such that free space becomes unknown again if it has not been seen free for a while. Is this possible and how can this best be done?
Update: In reply to the answer of @dornhege: I do assume setting the probability to 0.5, i.e., setting the value/logOdds to 0.0. However I notice that when a node has been updated to occupied, it can not be updated back to unknown. While traversing all leafs of the tree after a scan insertion I do the following:
OcTreeNode* node = octoMap_->octree.search(it.getKey());
node->setLogOdds(octomap::logodds(0.5f));
octoMap_->octree.updateInnerOccupancy();
When I next check if the node is occupied with
octoMap_->octree.isNodeOccupied(node)
true is returned and the occupancy is 0.5. How should I deal with this?
For general OctoMap questions and discussions (not related to ROS), I would suggest using our new mailing list: https://groups.google.com/d/forum/octomap