-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix rosbag device loading by preventing set_option to HDR/Gain/Exposure #2409
Conversation
@@ -97,7 +97,8 @@ namespace realsense2_camera | |||
BaseRealSenseNode(rclcpp::Node& node, | |||
rs2::device dev, | |||
std::shared_ptr<Parameters> parameters, | |||
bool use_intra_process = false); | |||
bool use_intra_process = false, | |||
bool is_rosbag_file = false); |
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.
Since you are getting the rs2::device as well, try to drop the new parameter (all over the code) and use this API, see if it's possible:
if (dev.is<playback>())
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.
Thanks.
It make sense and make the code easier.
I saw the PR you talked about, but still I wanted to do this without asking the primary node about rosbag_filename parameter value, since I don't thinks this is the best way to do this.
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.
Great, Lets also check if this API works too:
sensor.is<playback_sensor>()
If this works we can drop more changes.
Worth checking
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.
Not sure it's possible, I don't see playback_sensor
in the API
Have you seen this PR #2404 ? |
Tracked by [LRS-445]
If rosbag file was loaded, a virtual device cannot set options of HDR/Exposure/Gain
Prevent that by asking if we are on a rosbag file