Skip to content

Conversation

@dmytroye
Copy link
Member

@dmytroye dmytroye commented Dec 8, 2025

📝 Description

This PR implements functionality for Analytics to consume tracked object data from MQTT topics published by the Tracker service, replacing direct tracker calls with a message-based approach. The key changes include:

  • Adding MQTT subscription handling for tracked object data from the DATA_SCENE topic
  • Implementing a caching mechanism for tracked objects received via MQTT with fallback to direct tracker calls
  • Adding deserialization logic to convert MQTT message payloads into MovingObject-compatible structures

✨ Type of Change

Select the type of change your PR introduces:

  • 🐞 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

Describe how the changes were tested and how reviewers can test them too:

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

✅ Checklist

Before submitting the PR, ensure the following:

  • 🔍 PR title is clear and descriptive
  • 📝 For internal contributors: If applicable, include the JIRA ticket number (e.g., ITEP-123456) in the PR title. Do not include full URLs
  • 💬 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

@dmytroye dmytroye changed the title [WIP] Consume Tracker data from MQTT topic by Analytics [ITEP-82754] Consume Tracker data from MQTT topic by Analytics Dec 9, 2025
@dmytroye dmytroye self-assigned this Dec 9, 2025
@dmytroye dmytroye requested review from Copilot and tdorauintc and removed request for tdorauintc December 11, 2025 10:40
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 implements functionality for Analytics to consume tracked object data from MQTT topics published by the Tracker service, replacing direct tracker calls with a message-based approach. The key changes include:

  • Adding MQTT subscription handling for tracked object data from the DATA_SCENE topic
  • Implementing a caching mechanism for tracked objects received via MQTT with fallback to direct tracker calls
  • Adding deserialization logic to convert MQTT message payloads into MovingObject-compatible structures

Reviewed changes

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

File Description
controller/src/controller/scene_controller.py Adds handleSceneDataMessage method to process tracked objects from MQTT and subscribes to DATA_SCENE topic for analytics consumption
controller/src/controller/scene.py Implements tracked objects cache, deserialization logic, and getTrackedObjects method with MQTT-first approach and tracker fallback
controller/src/controller/detections_builder.py Adds frame_count field to object dictionary for analytics tracking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dmytroye dmytroye requested a review from Copilot December 15, 2025 10:51
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dmytroye dmytroye changed the title [ITEP-82754] POC: Consume Tracker data from MQTT topic by Analytics [DO NOT MERGE] [ITEP-82754] POC: Consume Tracker data from MQTT topic by Analytics Dec 30, 2025
…from MQTT

- Add _normalize_camera_bounds() to convert int->float for consistency
- Extract ref_camera_frame_rate before early returns in analytics mode
- Preserve camera_bounds from MQTT in _deserializeTrackedObjects()
- Add safety check in computeCameraBounds() for missing visibility key
- Add field ordering (similarity, first_seen before camera_bounds)
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.

2 participants