-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
disable OCC when RGB streaming #14010
Conversation
common/calibration-model.cpp
Outdated
@@ -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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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
common/device-model.cpp
Outdated
auto profiles = sub->get_selected_profiles(); | ||
for( const auto & profile : profiles ) | ||
if( profile.stream_type() == RS2_STREAM_COLOR ) | ||
return true; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
common/device-model.cpp
Outdated
@@ -3060,6 +3075,10 @@ namespace rs2 | |||
std::string& error_message) | |||
{ | |||
bool has_autocalib = false; | |||
|
|||
bool rgb_streaming = is_color_streaming(); |
There was a problem hiding this comment.
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
f09b3db
to
145f6e5
Compare
bb65f85
to
1bdf8f4
Compare
Tracked on : [RSDSO-19732]


In case of RGB streaming On-Chip Calibration option is disabled:
In addition, in case of RGB streaming when On-Chip Calibration window is up, the user will get this exception error message: