Segmentation fault in nearest neighbour search
dringakn opened this issue · 2 comments
I have been trying the following sample test code, however, it appears that there is some error in the nearest neighbor search implementation.
#include <ufo/map/occupancy_map.h>
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[])
{
ufo::map::OccupancyMap map(0.25, 16);
map.updateOccupancy(1, 1, 1, 1);
map.updateOccupancy(1, 1, -1, 1);
for (auto it = map.beginNNLeaves(ufo::map::Point3(1, 1, 1), true, true, true, false, 0); it != map.endNNLeaves(); ++it)
{
}
return 0;
}
is there any update on the issue?
The problem seems when validNode(...) calls following funciton:
bool containsUnknown(INNER_NODE const& node) const
{
return static_cast<INNER_NODE const&>(node).contains_unknown;
}
bool containsFree(INNER_NODE const& node) const
{
return static_cast<INNER_NODE const&>(node).contains_free;
}
why the inner_node is invalid?