Closed jvgomez closed 8 years ago
Does this change really require templates, or couldn't it be solved with polymorphism via the OccupancyOcTreeBase
base class or the AbstractOccupancyOcTree
interface?
Hi, from what I understand since some of the functions such as search and getTreeDepth are part of the templated OcTreeBaseImpl class we cannot use AbstractOccupancyOcTree. For the case of OccupancyOcTreeBase again since its templated with NodeType, I believe it is not possible to cast from one templated class to another even if the templates share same base class. I tested it out and it does not seem to work.
That's a pity, since it would make the plugin easier to use (one plugin for all kinds of octree classes). The abstract interface was also created for this purpose. So if there are specific functions missing, we should add them to OctoMap.
Yet, a definitely useful change, thanks for your contribution!
Depends on this PR
The main idea is that both OcTree and OcTreeStamped can be used indistinctly.
@gauthamm FYI.