-
Notifications
You must be signed in to change notification settings - Fork 333
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
Tiziano/Remove voxel block #381
Conversation
Two ideas from my side:
Although the effect is probably not too large, it looks more correct to me.
|
Regarding (1), while the data structure represents 3d space, we know that the environment is made mainly by local 2d surfaces. If you look into voxels, you will realize that most of the space is non-occupied as we never measure a 3d volume but just its borders (or contour), which is locally 2d. If we use the formula you propose, this will result in points being farther away from each other than necessary. The formula I propose is more consistent with reality in most cases and does not have a downside in my perspective. Regarding (2), I see your point and agree, but I also have doubts that we are seeing things from an "expert" perspective. I am also not sure about changing the parameter set now. The community is already used to these parameters, and this change just uses the same parameters to get a more intelligent way of adding points. A config change is probably a bit too much for that. On this point, @nachovizzo can also give us his perspective. |
I agree with small voxel sizes, but not necessarily with larger ones like the 1m default we have. Also, we still measure the distance to the map points in the volumetric 3D space, not on the surface. Anyway, we can just finish this PR and then check both distance computations to see if it has a practical impact. I just wanted to raise this because, for me, this is the most general way of thinking about a point distribution in a 3D voxel without drawing an assumption about how this data is obtained or the environment looks like. |
By the way, another way to achieve this spacing between map points would be to use a smaller voxel size and store only a single point per voxel. This would also wipe out the |
This is fantastic RE: runtime The only "new computation I see" is std::any_of(voxel_points.cbegin(), voxel_points.cend(),
[&](const auto &voxel_point) {
return (voxel_point - point).norm() < map_resolution;
})) { The rest are just "cosmetic" changes, the memory of the map should remain exactly the same, as we sitll store 20 points per voxel (although now they are equally spread) Which makes this change more attractive |
Also, thanks to STL, this block:
Will stop the execution once it found the first occurrence in which the predicate is true, which runtime-wise, is fantastic for us. |
Ok, now it builds also on Windows (you cannot use the |
This PR aims to follow up on our discussion among the KISS core team about making the points contained in our belovedVoxelHashMap
effective for data association.My proposal here is to have points equally spaced into each voxel. Based on the fact that our 3d world can be represented as a set of (locally) 2d surfaces, we can compute the desired minimum distance between points (from now on calledmap_resolution
) without adding parameter via:I will now proceed to benchmark and update this PR on-demand so that we have a record of what happened.Just remove the Voxel block as a struct, to have more control over the point addition in the
VoxelHashMap