Add RGB-Depth sync test#14168
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a comprehensive functional test for verifying synchronization between RGB and depth streams across multiple RealSense camera configurations. The test validates that color and depth streams can operate simultaneously with proper timestamp synchronization.
- Implements systematic testing across 20+ configuration combinations (resolution, fps)
- Validates frame delivery rates and timestamp synchronization between streams
- Provides context-aware test execution (reduced set for CI, full set for nightly)
| and p.as_video_stream_profile().height() == h) | ||
| except StopIteration: | ||
| log.d(f"Color profile not found for {w}x{h}@{fps}fps") | ||
| return False, 0, 0 |
There was a problem hiding this comment.
The return statement has 3 values but other return statements in the function (lines 95, 117, 132) have 4 values. This inconsistency will cause unpacking errors when the function result is used.
| return False, 0, 0 | |
| return False, 0, 0, [] |
| log.d(f"Received frames - Color: {color_frames}, Depth: {depth_frames}") | ||
|
|
||
| # Test passes if both streams received reasonable number of frames | ||
| color_ok = color_frames >= min_expected_frames |
There was a problem hiding this comment.
This is too strict no?
I think the frame max count is fps * frame duration no?
There was a problem hiding this comment.
I'm streaming for 3 seconds but expect only 2 seconds of frames to arrive.
Maybe this is even to loose.
There was a problem hiding this comment.
Oh now it's changed.
Maybe better to use the define like TEST_SLEEP_DURATION/2 or something?
It's even a bit risky as we have some time to first frame so 3 seconds can be even 1-2 seconds of frames
|
Close and reopen to trigger CI |
| # License: Apache 2.0. See LICENSE file in root directory. | ||
| # Copyright(c) 2025 RealSense Inc. All Rights Reserved. | ||
|
|
||
| # test:device D455 |
There was a problem hiding this comment.
Test failed as Win & Linux does not have a D457 device.
So instead of these 2 lines
change to
# test:device each(D400*)
There was a problem hiding this comment.
In addition, the test fails for D457
Please investigate this log:
https://rsjenkins.iil.intel.com/job/LRS_libci_pipeline/11689/artifact/arm64/static/Release/unit-tests/test-live-streaming-sync.log
|
RetriggerCI |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Add test-sync.py: Streaming Synchronization Functional Test
Overview
This PR introduces a new functional test, test-sync.py, to the streaming folder. The test validates the synchronization and reliability of simultaneous color and depth streaming across a comprehensive set of RealSense camera configurations.
Key Features
Functional Test Pattern:
Uses the standard RealSense test framework (rspy.test, rspy.log)
Each configuration is a separate test case with pass/fail status
Synchronization Validation:
check that color and depth stream are synchronized by testing the diff of the timestamp in the metadata.
Device Reset Between Runs:
Resets the device between each configuration to ensure a clean state and reliable results
Context-Aware Test Sets:
Robust Error Handling:
Handles missing profiles and device errors gracefully
Provides detailed debug logging for troubleshooting