Repository navigation
Remove step 1 cache after saving the session in command-line mode - #566
Merged
Merged
Conversation
The cache directory was only removed by the GUI's on_exit, so headless runs (<input_folder> and <input_folder> <params> <output_folder>) left all cached chunk points on disk. Extract remove_cache() and call it after the session is saved; on_exit uses the same helper. Fixes MapsHD#489 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #489
Problem
The step 1 cache directory (
<working_directory>/cache) was only removed by the GUI'son_exit(window close). The headless modes oflidar_odometry_step_1—<input_folder>and<input_folder> <params.toml> <output_folder>— never removed it, leaving all cached chunk points on disk after every run.Change
remove_cache(params)helper inlidar_odometry.cpp(skips an empty path, reports a failure viastd::error_codeinstead of throwing).lidar_odometry_gui.cpp.on_exitinlidar_odometry_gui.cppand the precision_forestry app now uses the same helper.In GUI mode the cache is still removed on window close, not right after the auto-save: "Save result", "Point cloud consistency…" and "Save all point clouds to single las/laz" still read the cache files after that point.
Testing
lidar_odometry_step_1anddrag_folder_with_mandeye_data_and_drop_here-precision_forestrybuild (macOS, release).🤖 Generated with Claude Code