if(it->getTimestamp() == sensor_id) {
octree->deleteNode(it.getKey());
}
>> iterate over all sensor points and do:for (pcl::PointCloud<pcl::PointXYZ>::const_iterator it = cloud->begin(); it != cloud->end(); ++it){octomap::OcTreeNodeStamped* node = octree_->updateNode(it->x,it->y,it->z, true);node->setTimestamp(id);}>> VisualizeOctree()This second method does not work properly; at my visualization, it appears that my octree is empty. So what is the exact difference between iterating over all nodes and do a deleteNode() for every node and a octree->clear()?What is the proper way of implementing this behavior when multiple sensors are used?Thanks,Rein
--
You received this message because you are subscribed to the Google Groups "OctoMap developers and users discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to octomap+u...@googlegroups.com.
To post to this group, send email to oct...@googlegroups.com.
Visit this group at http://groups.google.com/group/octomap.
For more options, visit https://groups.google.com/groups/opt_out.
This works perfectly. However, if I use this for multiple sensors I would like to only clear the nodes corresponding to that sensor. I implemented this as follows
>> iterate over all nodes and do:if(it->getTimestamp() == sensor_id) {octree->deleteNode(it.getKey());}
This second method does not work properly; at my visualization, it appears that my octree is empty. So what is the exact difference between iterating over all nodes and do a deleteNode() for every node and a octree->clear()?
What is the proper way of implementing this behavior when multiple sensors are used?
Any ideas on this? I have tried to do a lazy update (octree_->updateNode(it->x,it->y,it->z, true,true);) together with the deleteNode(it.getKey()) but then some other weird phenoma appears (see attachment).
-- Armin Hornung Humanoid Robots Lab, Albert-Ludwigs-Universitaet Freiburg Contact: http://www.informatik.uni-freiburg.de/~hornunga