Skip to content

disable OCC when RGB streaming #14010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Noy-Zini
Copy link

@Noy-Zini Noy-Zini commented May 18, 2025

Tracked on : [RSDSO-19732]
In case of RGB streaming On-Chip Calibration option is disabled:
image
In addition, in case of RGB streaming when On-Chip Calibration window is up, the user will get this exception error message:
image

@@ -536,7 +536,8 @@ void calibration_model::d400_update(ux_window& window, std::string& error_messag
}
ImGui::SameLine();

if (_accept)
auto streams = dev.query_sensors()[0].get_active_streams();
Copy link
Author

Choose a reason for hiding this comment

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

All changes in this file are related to calibration data, after some checks with FW we have to turn on "Stereo Module" in order to write into the calibration table. reverted changes made in - #13936

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is dangerous..
if you want the depth sensor you use
first_depth_sensor() API if possible

Copy link
Author

Choose a reason for hiding this comment

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

I see, I made the change to use dev.first<rs2::depth_sensor>().get_active_streams() let me know if that's ok

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's split it into 2 line to avoid static analysis issues (and also possible runtime issue if the camera does not have a depth sensor)

depth_sensor = dev.first<rs2::depth_sensor>();
if (!depth_sensor)
    ... something to avoid running the below code
active_streams = depth_sensor.    get_active_streams()

Copy link
Author

Choose a reason for hiding this comment

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

I added try catch ( dev.first throws an exception if there is no depth_sensor

@Noy-Zini Noy-Zini requested a review from Nir-Az May 18, 2025 12:13
auto profiles = sub->get_selected_profiles();
for( const auto & profile : profiles )
if( profile.stream_type() == RS2_STREAM_COLOR )
return true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

How do you know that this profile is the one streaming?
Why not just ask if the sub device is color sensor?

Copy link
Author

Choose a reason for hiding this comment

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

I see I wasn’t aware we could directly check if the subdevice is a color sensor. I’ve updated the code to use that instead.

And about the code before, we only reach the inner loop if the sub device is streaming. Since get_selected_profiles() returns the active profiles for that specific subdevice, if it's the RGB camera, it will include RS2_STREAM_COLOR otherwise, it won’t.

@@ -3060,6 +3075,10 @@ namespace rs2
std::string& error_message)
{
bool has_autocalib = false;

bool rgb_streaming = is_color_streaming();
Copy link
Collaborator

@Nir-Az Nir-Az May 18, 2025

Choose a reason for hiding this comment

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

rgb = color
Lets align the names..
I say color, rgb is a format of color

@Noy-Zini Noy-Zini force-pushed the Disable-on-chip-calibration-during-RGB-streaming branch from f09b3db to 145f6e5 Compare May 19, 2025 08:47
@Noy-Zini Noy-Zini force-pushed the Disable-on-chip-calibration-during-RGB-streaming branch from bb65f85 to 1bdf8f4 Compare May 20, 2025 09:08
@Noy-Zini Noy-Zini requested a review from Nir-Az May 20, 2025 13:27
@Nir-Az Nir-Az merged commit 670ca06 into IntelRealSense:development May 20, 2025
26 checks passed
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