feat(oak): make oak frame tracker track 1 stream - #874
Conversation
📝 WalkthroughWalkthrough
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant TeleopSession
participant FrameMetadataTrackerOak
participant LiveFrameMetadataTrackerOakImpl
participant OakSchemaTracker
participant MCAP writer
TeleopSession->>FrameMetadataTrackerOak: create one tracker per collection_id
LiveFrameMetadataTrackerOakImpl->>MCAP writer: create frame_metadata channel
LiveFrameMetadataTrackerOakImpl->>OakSchemaTracker: initialize and update one stream
TeleopSession->>FrameMetadataTrackerOak: get_data(session)
FrameMetadataTrackerOak-->>TeleopSession: return tracked metadata
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Signed-off-by: Shao Su <shaoxiangs@nvidia.com>
3c3c7ec to
bd47fbb
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/source/device/trackers.rst`:
- Around line 223-231: Add the repository-standard reStructuredText SPDX
copyright and license header at the beginning of the documentation file, before
the existing tracker content. Preserve all current documentation text and
formatting after the header.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d2ab9c01-5829-4ee7-92b5-7dab51ac9e17
📒 Files selected for processing (13)
docs/source/device/oak.rstdocs/source/device/trackers.rstexamples/oxr/python/test_oak_camera.pyexamples/schemaio/frame_metadata_printer.cppsrc/core/deviceio_base/cpp/inc/deviceio_base/frame_metadata_tracker_oak_base.hppsrc/core/deviceio_trackers/cpp/frame_metadata_tracker_oak.cppsrc/core/deviceio_trackers/cpp/inc/deviceio_trackers/frame_metadata_tracker_oak.hppsrc/core/deviceio_trackers/python/tracker_bindings.cppsrc/core/live_trackers/cpp/live_deviceio_factory.cppsrc/core/live_trackers/cpp/live_frame_metadata_tracker_oak_impl.cppsrc/core/live_trackers/cpp/live_frame_metadata_tracker_oak_impl.hppsrc/core/mcap/cpp/inc/mcap/recording_traits.hppsrc/plugins/oak/README.md
| Single-stream tracker for per-frame metadata from an OAK camera stream. | ||
| Create one instance per stream (e.g. ``"oak_camera/Color"``, ``"oak_camera/MonoLeft"``). | ||
| Uses the :code-file:`SchemaTracker <src/core/live_trackers/cpp/inc/live_trackers/schema_tracker.hpp>` | ||
| utility internally. | ||
|
|
||
| - Schema: :code-file:`src/core/schema/fbs/oak.fbs` | ||
| - C++ header: ``#include <deviceio/frame_metadata_tracker_oak.hpp>`` | ||
| - Python import: ``from isaacteleop.deviceio import FrameMetadataTrackerOak`` | ||
| - Record channels: one per configured stream (e.g. ``Color``, ``MonoLeft``) | MCAP schema: ``core.FrameMetadataOakRecord`` | ||
| - Record channels: ``frame_metadata`` | MCAP schema: ``core.FrameMetadataOakRecord`` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Add the required SPDX header.
docs/source/device/trackers.rst lacks the repository SPDX copyright and license header. Add the standard reStructuredText SPDX block at the start of the file.
Proposed fix
+.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+.. SPDX-License-Identifier: Apache-2.0
+
Device TrackersAs per coding guidelines, “Files covered by REUSE policy must include the repository’s standard SPDX copyright and license headers.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/source/device/trackers.rst` around lines 223 - 231, Add the
repository-standard reStructuredText SPDX copyright and license header at the
beginning of the documentation file, before the existing tracker content.
Preserve all current documentation text and formatting after the header.
Source: Coding guidelines
Description
Change FrameMetadataTrackerOak to only track one stream per tracker so it will match the pattern from #853
Fixes #868
Type of change
Testing
Tested with examples/oxr/python/test_oak_camera.py with schema-pusher mode and confirmed the live trackers are able to receive the messages from tensor API and write to the mcap file.
Checklist
SKIP=check-copyright-year pre-commit run --all-filesgit commit -s) per the DCOSummary by CodeRabbit
New Features
frame_metadatachannel.Documentation