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

Introduce Bonxai as Map representation #22

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7a19274
Add Bonxai and move kiss icp cmake
tizianoGuadagnino Nov 22, 2024
0084554
Start to work on the local map representation
tizianoGuadagnino Nov 22, 2024
4adc4e0
Add old API
tizianoGuadagnino Nov 22, 2024
01188b4
At least replicate the functionalities of kiss map, need to test and
tizianoGuadagnino Nov 22, 2024
be18fae
Just build bonxai_core
tizianoGuadagnino Nov 25, 2024
11b9c5a
Add patch
tizianoGuadagnino Nov 25, 2024
a7ddd20
To fix const correctness
tizianoGuadagnino Nov 25, 2024
7e9726f
Remove small vector
tizianoGuadagnino Nov 26, 2024
6ed4c01
Merge branch 'main' into tiziano/bonxai_minimal
tizianoGuadagnino Nov 29, 2024
c4c1d90
Some renaming and cleaning
tizianoGuadagnino Nov 29, 2024
2af1115
For more clarity
tizianoGuadagnino Nov 29, 2024
b76abda
Modify bonxai patch
tizianoGuadagnino Nov 29, 2024
f456e76
IWYU
tizianoGuadagnino Nov 30, 2024
bbb3ecc
Just reset the block
tizianoGuadagnino Dec 1, 2024
57977f1
Actually remove the keys when leafs are removed, a bit slower
tizianoGuadagnino Dec 2, 2024
45c1b2b
Control leaf and grid size
tizianoGuadagnino Dec 3, 2024
9859082
Forget to push the default config
tizianoGuadagnino Dec 3, 2024
9b84286
Update cpp/kinematic_icp/local_map/SparseVoxelGrid.cpp
tizianoGuadagnino Jan 9, 2025
da104ce
Merge branch 'main' into tiziano/bonxai_minimal
tizianoGuadagnino Jan 9, 2025
db1e16c
Revert "Merge branch 'main' into tiziano/bonxai_minimal"
tizianoGuadagnino Jan 9, 2025
920fb8f
At least replicate the functionalities of kiss map, need to test and
tizianoGuadagnino Nov 22, 2024
475d08d
Revert "Merge branch 'main' into tiziano/bonxai_minimal"
tizianoGuadagnino Jan 9, 2025
18b102a
Cannot merge
tizianoGuadagnino Jan 9, 2025
e58c060
Merge Myself
tizianoGuadagnino Jan 9, 2025
1e14a4e
Merge me from the window
tizianoGuadagnino Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Some renaming and cleaning
  • Loading branch information
tizianoGuadagnino committed Nov 29, 2024
commit c4c1d901fe113ee45e781a10eecef082ab400863
9 changes: 5 additions & 4 deletions cpp/kinematic_icp/local_map/SparseVoxelGrid.cpp
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
#include "bonxai/grid_coord.hpp"

namespace {
static std::array<Bonxai::CoordT, 27> shifts{
static constexpr std::array<Bonxai::CoordT, 27> shifts{
Bonxai::CoordT{-1, -1, -1}, Bonxai::CoordT{-1, -1, 0}, Bonxai::CoordT{-1, -1, 1},
Bonxai::CoordT{-1, 0, -1}, Bonxai::CoordT{-1, 0, 0}, Bonxai::CoordT{-1, 0, 1},
Bonxai::CoordT{-1, 1, -1}, Bonxai::CoordT{-1, 1, 0}, Bonxai::CoordT{-1, 1, 1},
@@ -60,9 +60,10 @@ std::tuple<Eigen::Vector3d, double> SparseVoxelGrid::GetClosestNeighbor(
Eigen::Vector3d closest_neighbor = Eigen::Vector3d::Zero();
double closest_distance = std::numeric_limits<double>::max();
const auto const_accessor = map_.createConstAccessor();
const Bonxai::CoordT query_voxel = map_.posToCoord(query);
std::for_each(shifts.cbegin(), shifts.cend(), [&](const Bonxai::CoordT &voxel_coordinates) {
const VoxelBlock *voxel_points = const_accessor.value(query_voxel + voxel_coordinates);
const Bonxai::CoordT voxel = map_.posToCoord(query);
std::for_each(shifts.cbegin(), shifts.cend(), [&](const Bonxai::CoordT &voxel_shift) {
const Bonxai::CoordT query_voxel = voxel + voxel_shift;
const VoxelBlock *voxel_points = const_accessor.value(query_voxel);
if (voxel_points != nullptr) {
const Eigen::Vector3d &neighbor =
*std::min_element(voxel_points->cbegin(), voxel_points->cend(),