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

Segmentation fault in nearest neighbour search #7

Open
dringakn opened this issue Jun 30, 2021 · 2 comments
Open

Segmentation fault in nearest neighbour search #7

dringakn opened this issue Jun 30, 2021 · 2 comments

Comments

@dringakn
Copy link

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;
}

@dringakn
Copy link
Author

is there any update on the issue?

@dringakn
Copy link
Author

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?

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

1 participant