Skip to content

fix(controller): preserve UUID for static objects after occlusion (#1152)#1155

Open
COZYTRICKSTER wants to merge 1 commit intoopen-edge-platform:release-2025.2from
COZYTRICKSTER:fix-controller-uuid-occlusion
Open

fix(controller): preserve UUID for static objects after occlusion (#1152)#1155
COZYTRICKSTER wants to merge 1 commit intoopen-edge-platform:release-2025.2from
COZYTRICKSTER:fix-controller-uuid-occlusion

Conversation

@COZYTRICKSTER
Copy link

📝 Description

When a static object becomes temporarily occluded and later reappears in the scene, the controller assigns a new UUID instead of preserving the original one. This breaks object identity continuity for static objects across short occlusions.

This change updates the controller logic to ensure that static objects retain their original UUID when reactivated from suspended tracks.

Fixes #1152

🔍 Behavior Before / After

Before

  • When a static object became occluded and later reappeared, the controller generated a new UUID.
  • This caused loss of object identity across short occlusions.

After

  • When the object reappears after occlusion, the controller preserves the original UUID from the suspended track.
  • Object identity remains consistent across occlusion events.

✨ Type of Change

  • 🐞 Bug fix – Non-breaking change which fixes an issue
  • 🚀 New feature – Non-breaking change which adds functionality
  • 🔨 Refactor – Non-breaking change which refactors the code base
  • 💥 Breaking change – Changes that break existing functionality
  • 📚 Documentation update
  • 🔒 Security update
  • 🧪 Tests
  • 🚂 CI

🧪 Testing Scenarios

  • ✅ Tested manually
  • 🤖 Ran automated end-to-end tests

Tested locally by simulating occlusion scenarios where static objects temporarily disappear and later reappear. Verified that the original UUID is preserved when the object is reactivated.

✅ Checklist

  • 🔍 PR title is clear and descriptive
  • 📝 For internal contributors: If applicable, include the JIRA ticket number in the PR title
  • 💬 I have commented my code, especially in hard-to-understand areas
  • 📄 I have made corresponding changes to the documentation
  • ✅ I have added tests that prove my fix is effective or my feature works

Copy link
Contributor

@tdorauintc tdorauintc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saratpoluri please review this change, it may impact ReID functionality.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes object identity continuity in the controller by preserving UUID/GID mappings for static objects across short occlusions, leveraging suspended/unreliable tracks from the underlying C++ tracker.

Changes:

  • Expose suspended and unreliable track lists from MultipleObjectTracker to Python bindings.
  • Update controller tracking flow to prune UUID mappings based on all active/suspended C++ tracks (not only reliable ones).
  • Attempt to reuse an existing GID mapping for a reactivated rv_id instead of assigning a new UUID.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
controller/src/robot_vision/python/src/robot_vision/extensions/tracking.cpp Adds Python bindings for MultipleObjectTracker.get_suspended_tracks() and .get_unreliable_tracks().
controller/src/robot_vision/include/rv/tracking/MultipleObjectTracker.hpp Adds corresponding C++ accessors forwarding to TrackManager.
controller/src/controller/uuid_manager.py Stores an assigned UUID/GID into active_ids for new tracker IDs (intended to preserve identity).
controller/src/controller/ilabs_tracking.py Uses existing UUID/GID mapping for reactivated tracks and prunes mappings using reliable+unreliable+suspended track sets.

Comment on lines +202 to +207
# Include ALL active C++ tracks to preserve UUID mappings
all_active_tracks = (self.tracker.get_reliable_tracks() +
self.tracker.get_unreliable_tracks() +
self.tracker.get_suspended_tracks())
tracked_objects = self.tracker.get_reliable_tracks()
self.uuid_manager.pruneInactiveTracks(tracked_objects)
self.uuid_manager.pruneInactiveTracks(all_active_tracks)
Comment on lines +288 to +291
# Store the assigned UUID in active_ids
with self.active_ids_lock:
if self.active_ids.get(sscape_object.rv_id, [None])[0] is None:
self.active_ids[sscape_object.rv_id] = [sscape_object.gid, None]
Comment on lines +132 to +137
# Check if UUID manager already has a mapping for this rv_id
existing_gid = self.uuid_manager.active_ids.get(sscape_object.rv_id, [None])[0]
if existing_gid is None:
sscape_object.setGID(uuid)
else:
sscape_object.setGID(existing_gid)
Comment on lines +135 to +137
sscape_object.setGID(uuid)
else:
sscape_object.setGID(existing_gid)
Comment on lines +184 to 188
# Include ALL active C++ tracks to preserve UUID mappings
all_active_tracks = (self.tracker.get_reliable_tracks() +
self.tracker.get_unreliable_tracks() +
self.tracker.get_suspended_tracks())
tracked_objects = self.tracker.get_reliable_tracks()
Comment on lines +184 to +189
# Include ALL active C++ tracks to preserve UUID mappings
all_active_tracks = (self.tracker.get_reliable_tracks() +
self.tracker.get_unreliable_tracks() +
self.tracker.get_suspended_tracks())
tracked_objects = self.tracker.get_reliable_tracks()
self.uuid_manager.pruneInactiveTracks(tracked_objects)
self.uuid_manager.pruneInactiveTracks(all_active_tracks)
Comment on lines +202 to 206
# Include ALL active C++ tracks to preserve UUID mappings
all_active_tracks = (self.tracker.get_reliable_tracks() +
self.tracker.get_unreliable_tracks() +
self.tracker.get_suspended_tracks())
tracked_objects = self.tracker.get_reliable_tracks()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants