Git Product home page Git Product logo

Comments (6)

ahornung avatar ahornung commented on September 23, 2024

Imported from trac issue 6. Created by michischolz on 1970-01-01T01:22:16, last modified: 1970-01-01T01:22:16

from octomap.

ahornung avatar ahornung commented on September 23, 2024

Trac comment by ahornung on 1970-01-01 01:22:22:

Thanks for the patch! Could you test in your implementation if it also works identically without "genKeyAtDepth"? That function will disappear soon, and should not be necessary. Just leave "key_at_depth = key" in all cases.

from octomap.

ahornung avatar ahornung commented on September 23, 2024

Trac comment by michischolz on 1970-01-01 01:22:22:

Yay! I had many problems using keys generated at level 16 for node access at depths < 16. I can test whether this maybe changed by now but for my implementations I use ''genKeyAtDepth()'' quite often. Especially when feeding BBXIterator with a Key-BBX '''and''' restricting it to a certain depth, the keys used for this BBX have to be valid for the requested depth. Otherwise I get strange results.
Another case could be my neighbour search where I use this function, but I have to check tomorrow.

Further ''updateNode()'' is basically the same as ''search()'' but implemented recursively and not using an elegant for-loop. So, adding a depth-parameter to ''updateNode()'' is also possible, I have a patch ready for that as well but thought it would be maybe nicer to rewrite ''updateNode()'' to the style of ''search()'' anyway.

from octomap.

ahornung avatar ahornung commented on September 23, 2024

Trac comment by ahornung on 1970-01-01 01:22:22:

In that case genKeyAtDepth will stay (but get renamed), I assumed it's no longer used since there was no reference to it within OctoMap. All genXXX functions are now named clearer in trunk after a cleanup. But I intend to directly compute the key at depth with

{{{
OcTreeKey coordToKey(const point3d& coord, unsigned depth)
}}}

instead of shifting an existing key (which now requires genKey and genKeyAtDepth). Or do you see a use case for that?

If you have any code snipplets to test, that would be good.

Regarding ''updateNode()'': A new ticket would be good for that. But I don't fully see the use case for updating the tree at a larger resolution than tree res. During query time it creates a speedup, but the tree stays identical. I see further problems with the change detection code, which always assumes keys at lowest tree level.

from octomap.

ahornung avatar ahornung commented on September 23, 2024

Trac comment by michischolz on 1970-01-01 01:22:22:

Regarding ''updateNode()'': One case for updating at a certain depth < max_deph:

  • You extract information (objects) at a depth < max_depth because you are interested in this particular depth (rather the resolution at this depth)
  • This extracted information is held in some other data structure, let's say a map which maps "something very fancy" to the tree key of each extracted cell
  • Now many funny things happen that cause the tree to disappear. The extracted information still persists
  • At some later point in the program the octree is recreated at the location where the previously extracted information is located
  • New measurements at max_depth are being integrated but one wants '''also''' the previously extracted information to be reintegrated into the newly built octree. Because this stuff was extracted at depth x < max_depth we have to use ''updateNode()'' with a key for this certain depth < max_depth :)

In general I use 3d-points/coordinates only for new measurement integration. All other processes inside/around my octree are some kind of "low level" and are implemented on key-level. This is where I need the key conversion functions. But I'll check how often this is the case.

from octomap.

ahornung avatar ahornung commented on September 23, 2024

Trac comment by ahornung on 1970-01-01 01:22:22:

Implemented in Rev. [392]:

  • new functions adjustKeyAtDepth() and coordToKey() with depth parameter to replace genKeyAtDepth
  • Patch for search integrated

from octomap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.