How to change occupancy in a OcTree

asked 2018-08-28 06:48:13 -0500

hefver gravatar image

updated 2018-08-28 06:48:44 -0500

I am using Ubuntu 16.04 and Ros Kinetic. I have an OcTree "prueba.ot" and I want to change the occupancy status of all the nodes. For example, if a node is occupied I would like to put it like unoccupied. For example:

 for(OcTree::tree_iterator it = ot->begin_tree(), end = ot->end_tree(); it!=end; ++it){

    OcTreeNode *n = ot->search(it.getX(), it.getY(), it.getZ());

    if(n){

        if(ot->isNodeOccupied(n)){
             //Update the node to unoccupied
        }
        else{
             //Update the node to occupied
        }
 }

Is it possible to do that? Thanks in advance!

edit retag flag offensive close merge delete