Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octomap contains InvalidHandles #1

Open
linas opened this issue Dec 13, 2016 · 0 comments
Open

octomap contains InvalidHandles #1

linas opened this issue Dec 13, 2016 · 0 comments
Assignees

Comments

@linas
Copy link
Member

linas commented Dec 13, 2016

Applying the patch below to the octomap shows that the octomap contains a lot of "invalid handles". This is surely not very efficient, and it would be better if these were never placed in there, to begin with.

--- a/opencog/timeoctomap/TimeOctomap.cc
+++ b/opencog/timeoctomap/TimeOctomap.cc
@@ -80,14 +80,19 @@ Handle TimeSlice::get_atom_at_location(const point3d& locati
 point3d_list TimeSlice::get_locations(const Handle& ato)
 {
     point3d_list pl;
+std::cout<<"duuude getting locations at slisece="<<t<< " p="<<((void*)this)<<st
     for (AtomOcTree::tree_iterator ita =
         map_tree.begin_tree(),
         end = map_tree.end_tree();
         ita != end;
         ++ita)
     {
+std::cout<<"duuude looopy atom="<<ita->getData()<<std::endl;
         if (ita->getData() == ato)
+        {
+std::cout<<"duuuude yayyyy"<<std::endl;
             pl.push_back(ita.getCoordinate());
+        }
     }
     return pl;
 }

prints this:

duuude getting locations at slisece=1481620154 p=0x3c150d0
duuude slice holds atom!!
duuude looopy atom=Invalid Handle
duuude looopy atom=Invalid Handle
duuude looopy atom=Invalid Handle
duuude looopy atom=Invalid Handle
duuude looopy atom=Invalid Handle
duuude looopy atom=Invalid Handle
duuude looopy atom=Invalid Handle
duuude looopy atom=Invalid Handle
@linas linas transferred this issue from opencog/opencog Sep 14, 2019
ngeiswei pushed a commit to ngeiswei/spacetime that referenced this issue Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants