IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.42k stars 4.8k forks source link

viewer presets for dds devices #13074

Closed maloel closed 1 day ago

maloel commented 4 days ago

Enabled Viewer presets in DDS devices. The Viewer detects that a device has presets based on implementation of serializable_interface. Added a unit-test making sure that DDS devices are serializable, and have their Visual Preset set first when loading JSON.

The values for all serialized sensors are kept in <sensor-name>/<option-name> keys when serializing. On loading, the Visual Preset option is special: it is the baseline for all other options, so it is changed first. Then all the rest of the options are loaded.

Enhanced test.remote so capture of remote stdout is possible.

Read-only options were not tested before. Added a test for those as well, but noticed that they are actually settable (i.e., it was up to the server to check read-only). I don't know what's right at this point, but I think it's safe for LibRS to fail and throw if a read-only option is modified. The code for the regular non-DDS options also seems to not check.

Tracked on [RSDEV-986]

OhadMeir commented 3 days ago

Read-only options were not tested before. Added a test for those as well, but noticed that they are actually settable (i.e., it was up to the server to check read-only). I don't know what's right at this point, but I think it's safe for LibRS to fail and throw if a read-only option is modified. The code for the regular non-DDS options also seems to not check.

I think that back than we discussed it and decided not to check read only. Leave it for the server to fail if trying to update read only.

OhadMeir commented 3 days ago

the Visual Preset option is special: it is the baseline for all other options, so it is changed first. Then all the rest of the options are loaded.

Not sure I understand what is special in the preset value. Changing preset triggers a change in a group of "advanced mode" options, but it does not affect regular options like exposure and such. I think that "Advanced mode" options are not exposed via DDS

maloel commented 3 days ago

Not sure I understand what is special in the preset value. Changing preset triggers a change in a group of "advanced mode" options, but it does not affect regular options like exposure and such. I think that "Advanced mode" options are not exposed via DDS

The Visual Preset sets parameters that may not even have equivalents available to the user: internal settings. The idea here is that the preset determines the "baseline" on top of which the rest of the settings are then applied. If still unclear, let's talk.