Skip to content

[fix] write the edex intrinsics key as size, not resolution - #152

Merged
slepichev merged 1 commit into
mainfrom
slepichev/fix-ros-bag-conversion-2
Sep 8, 2026
Merged

[fix] write the edex intrinsics key as size, not resolution#152
slepichev merged 1 commit into
mainfrom
slepichev/fix-ros-bag-conversion-2

Conversation

@slepichev

@slepichev slepichev commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Intrinsics.resolution is declared with alias="size", but EDEXMetadata.write dumped the models without by_alias, so pydantic serialised the field name. Every file the writer produced carried "resolution" and then failed to load in both readers: EDEX_CAM_SIZE in libs/edex/edex_internal.h, and the key check in dataset_reader.py that raises KeyError: 'size'. This hit every producer going through EDEXMetadata.write, not just the RGB-D path.

The existing round trip test missed it because the model sets populate_by_name, so reading the written file back accepts either spelling. The new test opens the raw json instead.

Summary by CodeRabbit

  • Bug Fixes

    • Corrected EDEX output so camera intrinsics use the size field consistently.
    • Removed the legacy resolution field from generated EDEX JSON.
  • Tests

    • Added coverage to verify the corrected output format.

Intrinsics.resolution is declared with alias="size", but EDEXMetadata.write
dumped the models without by_alias, so pydantic serialised the field name.
Every file the writer produced carried "resolution" and then failed to load
in both readers: EDEX_CAM_SIZE in libs/edex/edex_internal.h, and the key
check in dataset_reader.py that raises KeyError: 'size'. This hit every
producer going through EDEXMetadata.write, not just the RGB-D path.

The existing round trip test missed it because the model sets
populate_by_name, so reading the written file back accepts either spelling.
The new test opens the raw json instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: a5e1a8c0-089e-4cfa-8a9a-787a026aa3c6

📥 Commits

Reviewing files that changed from the base of the PR and between 8134ef5 and 2fbf83b.

📒 Files selected for processing (2)
  • tools/python_tools/cuvslam_tools/common/edex.py
  • tools/python_tools/cuvslam_tools/tests/test_edex.py

Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The EDEX writer now serializes Pydantic models with aliases. Camera intrinsics use the size JSON key instead of resolution. A regression test verifies the output.

Changes

EDEX alias serialization

Layer / File(s) Summary
Writer alias output and regression coverage
tools/python_tools/cuvslam_tools/common/edex.py, tools/python_tools/cuvslam_tools/tests/test_edex.py
The writer enables Pydantic aliases. The regression test verifies that camera intrinsics contain size and omit resolution.

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 2fbf8

EDEX metadata now writes camera intrinsics with the required size key, restoring compatibility with EDEX and dataset readers. The raw JSON regression test covers the corrected serialization behavior, with no remaining merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: writing the EDEX intrinsics key as "size" instead of "resolution".
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch slepichev/fix-ros-bag-conversion-2

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Test Results

Status Platform Language Total Passed Failed Errors Skipped
Orin C++ 17 17 0 0 0
Orin Python 74 73 0 0 1
Thor C++ 17 17 0 0 0
Thor Python 74 73 0 0 1
x86_64 C++ 17 17 0 0 0
x86_64 Python 74 73 0 0 1

cuVSLAM Evaluation KPIs

Config Dataset ATE, % ARE, º/m Kabsch Losts diff ATE, % diff ARE, º/m diff Kabsch diff Losts FPS, Hz
x86_64-cuda12.6.3-ubuntu24.04 EUROC-VIO_ODOM 1.6516 0.1497 0.0943 0 -0.0002 -0.0000 -0.0001 0 121.6
x86_64-cuda12.6.3-ubuntu24.04 EUROC-VIO_SLAM 1.7849 0.1928 0.0595 0 -0.0000 0.0001 -0.0000 0 98.9
x86_64-cuda12.6.3-ubuntu24.04 KITTI-STEREO_ODOM 0.8185 0.0023 2.7484 0 -0.0027 -0.0000 -0.0419 0 244.6
x86_64-cuda12.6.3-ubuntu24.04 KITTI-STEREO_SLAM 0.7288 0.0020 1.9272 0 0.0042 -0.0000 -0.0203 0 170.0

Artifacts

@slepichev
slepichev merged commit 443e9b9 into main Sep 8, 2026
7 checks passed
@slepichev
slepichev deleted the slepichev/fix-ros-bag-conversion-2 branch September 8, 2026 16:41
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