-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Support for selecting stream_type specific profile #3019
Conversation
rs2::stream_profile VideoProfilesManager::validateAndGetSuitableProfile(rs2_stream stream_type, rs2::stream_profile given_profile) | ||
{ | ||
if (_all_profiles.empty()) | ||
throw std::runtime_error("Wrong commands sequence. No profiles set."); |
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.
can you elaborate on this situation? can you please give an example ?
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 error check was already there in getDefaultProfiles()
function. Will remove it as it is not required here.
} | ||
|
||
// If given profile is not suitable, choose the first available profile for the given stream. | ||
if (!is_given_profile_suitable) |
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.
and also here, can you give me an example ?
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.
Depth Mapping Camera module doesn't have any default profiles (for both occupancy and labeled pointcloud streams). So, getDefaultProfiles()
function will consider the first listed profile as default profile. Due to this reason, lpc stream's profile will be considered as default profile. But that profile is not supported by Occupancy stream.
So here, for Occupancy stream, the given profile (lpc's profile) is not suitable. If not suitable, consider the first detected Occupancy stream profile.
Let's apply same scenario for Depth module. Depth stream has default profile, but IR streams doesn't. Fortunately, depth stream's default profile is suitable for IR streams. No issues for this scenario.
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 case can be handled either this way or inside getDefaultProfiles()
function itself by providing one default profile per stream.
Looks good. Only answer my two questions please. |
This feature is now available in ros2-development branch. Reference PR #3052. It will be taken to ros2-hkr branch while merging. |
Tracked by RSDEV-1745