Closed zerostarter1998 closed 3 weeks ago
Hi @zerostarter1998 json camera configuration files are usually exported from the realsense-viewer tool instead of the Depth Quality Tool (DQT). I am not aware of any RealSense users that have previously used a json exported from the DQT. Would it be possible to repeat your settings in realsense-viewer and export a json from there, please?
You can also test your script's json import by downloading an official RealSense SDK json from the table at the link below.
https://dev.intelrealsense.com/docs/d400-series-visual-presets#preset-table
Thank you for your reply. I exported a json from realsense-viewer repeating the same settings. I checked the files and found the same content, so the problem is not on that. I downloaded a json from the mentioned link and tried to load it, leading to the same result. Anyway the problem is unsolved and for the record the code is running in Windows 11 system.
The problem may be that the config.enable_device_from_file()
instruction is used for importing .bag files (recordings of camera data) and not json camera configuration files. For importing json files, the instruction json.load is used. https://github.com/IntelRealSense/librealsense/issues/6075#issuecomment-600087038 has an example of a Python script for importing a json with a specific filename.
The link below has another Python script that demonstrates use of json.load.
I was trying to load local config settings which are saved from DQT I wrote follow python code:
Then i got:
RuntimeError: Failed to resolve request. Request to enable_device_from_file("../model/camerasettings.json") was invalid, Reason: Failed to create ros reader: Error opening file: ../model/camerasettings.json