diff --git a/cpp/kiss_icp/core/VoxelUtils.cpp b/cpp/kiss_icp/core/VoxelUtils.cpp index 683d53aa..f8f8ea8c 100644 --- a/cpp/kiss_icp/core/VoxelUtils.cpp +++ b/cpp/kiss_icp/core/VoxelUtils.cpp @@ -4,11 +4,11 @@ namespace kiss_icp { -std::vector VoxelDownsample(const std::vector &point_cloud, +std::vector VoxelDownsample(const std::vector &frame, const double voxel_size) { tsl::robin_map grid; - grid.reserve(point_cloud.size()); - std::for_each(point_cloud.cbegin(), point_cloud.cend(), [&](const auto &point) { + grid.reserve(frame.size()); + std::for_each(frame.cbegin(), frame.cend(), [&](const auto &point) { const auto voxel = PointToVoxel(point, voxel_size); if (!grid.contains(voxel)) grid.insert({voxel, point}); }); diff --git a/cpp/kiss_icp/core/VoxelUtils.hpp b/cpp/kiss_icp/core/VoxelUtils.hpp index b0e06626..fee257a9 100644 --- a/cpp/kiss_icp/core/VoxelUtils.hpp +++ b/cpp/kiss_icp/core/VoxelUtils.hpp @@ -35,7 +35,7 @@ inline Voxel PointToVoxel(const Eigen::Vector3d &point, const double voxel_size) static_cast(std::floor(point.z() / voxel_size))); } /// Voxelize a point cloud keeping the original coordinates -std::vector VoxelDownsample(const std::vector &point_cloud, +std::vector VoxelDownsample(const std::vector &frame, const double voxel_size); } // namespace kiss_icp