Skip to content

Commit

Permalink
Update cpp/kiss_icp/core/VoxelHashMap.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Luca Lobefaro <[email protected]>
  • Loading branch information
nachovizzo and l00p3 authored Aug 6, 2024
1 parent 3468864 commit d7ab6c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cpp/kiss_icp/core/VoxelHashMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ std::vector<Eigen::Vector3d> VoxelHashMap::Pointcloud() const {

// Get the indices of the occupided voxels as points, mainly used for visualization
std::vector<Voxel> VoxelHashMap::GetVoxels() const {
std::vector<Voxel> voxels(map_.size());
std::transform(map_.cbegin(), map_.cend(), voxels.begin(),
[](const auto &map_element) { return map_element.first; });
return voxels;
}
std::vector<Voxel> voxels;
voxels.reserve(map_.size());
for (const auto &[voxel, voxel_block] : map_) {
Expand Down

0 comments on commit d7ab6c4

Please sign in to comment.