Repository navigation
global_scene_solver: fix add_scenes() stale scene cleanup - #379
Merged
Merged
Conversation
bl4ckb0ne
requested changes
Oct 16, 2026
damaestro
force-pushed
the
fix-gss-scene-cleanup
branch
2 times, most recently
from
October 18, 2026 16:00
a29aff5 to
add7631
Compare
The cleanup added in f23d298 compacted scenes by copying only the .so pointer, pairing objects with another slot's pose/measurements, and reset scenes_cnt (a ring counter) on every call. This made the global solve diverge and broke the lh2_test_cal.pcap.gz_pcap and haagh-tracking2.rec.gz tests. Compact by swapping whole entries, scan only the filled slots (clamping the unbounded ring counter), and touch scenes_cnt only when a scene was removed. Factor the liveness check into scene_object_alive(), and use the clamped count in run_optimization() so the auto-floor and SPHERE loops cannot read past scenes[] once the ring has wrapped. Assisted-by: Claude Code:claude-sonnet-5-5
damaestro
force-pushed
the
fix-gss-scene-cleanup
branch
from
October 18, 2026 16:05
add7631 to
85b1b3c
Compare
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.
The cleanup added in f23d298 compacted scenes by copying only the .so pointer, pairing objects with another slot's pose/measurements, and reset scenes_cnt (a ring counter) on every call. This made the global solve diverge and broke the lh2_test_cal.pcap.gz_pcap and haagh-tracking2.rec.gz tests.
Compact by swapping whole entries, scan only the filled slots, and touch scenes_cnt only when a scene was removed.