diff --git a/apps/lidar_odometry_step_1/lidar_odometry_utils_optimizers.cpp b/apps/lidar_odometry_step_1/lidar_odometry_utils_optimizers.cpp index a6b91211..1fe928dd 100644 --- a/apps/lidar_odometry_step_1/lidar_odometry_utils_optimizers.cpp +++ b/apps/lidar_odometry_step_1/lidar_odometry_utils_optimizers.cpp @@ -2257,7 +2257,6 @@ bool process_worker_step_update_rgd_after( { acc_distance = 0; std::scoped_lock lock(params.mutex_buckets_indoor, params.mutex_buckets_outdoor); - // the upstream decimate() below discards its result: the buffer is never decimated, so neither is this const Eigen::Vector3d viewport = worker_data.intermediate_trajectory[0].translation(); spill->reset( [&](const std::vector& chunk, bool ray_cast) @@ -2289,7 +2288,7 @@ bool process_worker_step_update_rgd_after( // decimate if (params.decimation > 0) { - decimate(points_global, params.decimation, params.decimation, params.decimation); + points_global = decimate(points_global, params.decimation, params.decimation, params.decimation); } if (params.ablation_study_use_hierarchical_rgd) diff --git a/apps/lidar_odometry_step_1/points_global_spill.h b/apps/lidar_odometry_step_1/points_global_spill.h index 0f48458e..9f14f486 100644 --- a/apps/lidar_odometry_step_1/points_global_spill.h +++ b/apps/lidar_odometry_step_1/points_global_spill.h @@ -13,6 +13,7 @@ //! reset: its second half becomes the new buffer and is folded into the buckets point by point, in order. Kept in a //! file instead of RAM, and streamed back in the same order with the ray-cast decision of its whole size, the buckets //! and so the trajectory are the ones the in-memory buffer gives; the RAM is one chunk. Empty directory = in memory. +//! The exception is params.decimation > 0: the in-memory buffer is decimated at a reset and this one is not, so they differ. //! //! One spill file per compute_step_2 call, owned by a PointsGlobalSpill on that call's stack and reached through //! LidarOdometryParams::points_global_spill: created on entry, its final close checked on success, removed on every exit.