Skip to content

Commit

Permalink
PR #2601 from SamerKhshiboun: if default profile is not defined, take…
Browse files Browse the repository at this point in the history
… the first available profile as default
  • Loading branch information
Nir-Az authored Jan 25, 2023
2 parents 0b824c5 + f000930 commit 14ef318
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion realsense2_camera/src/profile_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ rs2::stream_profile ProfilesManager::getDefaultProfile()
}
}
if (!(default_profile.get()))
throw std::runtime_error("No default profile found");
{
ROS_INFO_STREAM("No default profile found. Setting the first available profile as the default one.");
default_profile = _all_profiles.front();
}

return default_profile;
}
Expand Down

0 comments on commit 14ef318

Please sign in to comment.