-
Notifications
You must be signed in to change notification settings - Fork 4.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
Cannot load presets with D415 using Pyrealsense2 Error: HResult 0x8007001f #5172
Comments
Is the Python script in the link below for applying the High Accuracy preset any help to you please? An easy way to define your own custom JSON file is to set up your preferred settings in the Real sense Viewer and then export them as a JSON using an icon on the toolbar at the top of the options side-panel. |
@hobbitsyfeet hello,
The syntax is not correct - the string object that you pass along should include the content of the json file, not its name. #3696, #4046.
Correct, follow the python link you've posted and expand the demo by adding |
Hi, and sorry, that syntax mistake is from trying to give context to to the input rather than a variable from the JSON content. Can sure tell this is my first issue, eh? I'm trying my best, just try to keep with me... Here is what is going on when I execute the rs400-advanced-mode.
Here is what happens when I replace
with this using the HighResHighAccuracyPreset.json
Notice how there's quotes around the input in the first set but not the second? I tried adding quotes to the JSON and it failed, so why would there be in the serialized_json()? I tried to look up the definition of the function in https://intelrealsense.github.io/librealsense/python_docs/_generated/pyrealsense2.rs400_advanced_mode.html?highlight=advanced#pyrealsense2.rs400_advanced_mode.serialize_json but there's no description of what it does. Could it be an issue with how the input is formatted? Here I see the same SDK Version (2.29) for C# where the wrapper simply doesn't have access to Advanced Mode instructions. Though the examples available for python and closing of issues suggest it has been.
I have used this and ran into the exact same issue with |
It would probably be useful to note that I tried loading the JSON and the IntelRealsense Viewer cannot load any of the presets again, even after restarting hardware, and the computer it's running on. I get a variety of errors including
as well as this when I try to set it again:
When I try and return back to Custom Preset
This is very odd because before I tried to save the preset and load it, none of this was happening in the viewer and I could access the presets just fine. A fresh install does fix the issue with loading presets in the viewer. This only happens with the settings the viewer exports and loads, but not with the JSON settings downloaded from the librealsense viewer site. |
@hobbitsyfeet, can you provide the json you're using and also post the camera info ? |
Issue Description
I've been trying to load the preset options both by using:
1.
depth_sensor.set_option(rs.option.visual_preset , 3)
2.
advanced_mode.load_json("./HighResHighAccuracyPreset.json")
and both result in this error:
hr returned: HResult 0x8007001f: "A device attached to the system is not functioning."
I've encountered this problem with my code resembling the solution in #2577 and the example code from https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/python-rs400-advanced-mode-example.py .
When I use the Realsense Viewer V2.29.0, the High Accuracy preset works fine.
The only success I've been able to find is using
depth_sensor.set_option(rs.option.visual_preset , 0)
I don't know if this has anything to do with it, but if I try setting depth_sensor options that are not the presets, such as
depth_sensor.set_option(rs.option.max_distance,10)
I get object doesn't support option # 34. But rs.option.exposure works?Is it possible to manually set the options I see in the JSON?
I'll continue to try with a different computer and perhaps using Ubuntu instead of Windows, but ideally I would like to use Windows for this.
The text was updated successfully, but these errors were encountered: