-
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
D455 Segfault toggling advanced mode: set_power_state #12515
Comments
Hi @fk-bbraun Please first try setting the Laser Power value to 0 using the C++ code under the librealsense2 heading at the link below. This will temporarily disable the D455 camera's projector. https://dev.intelrealsense.com/docs/api-how-to#controlling-the-laser The D405 is not equipped with a projector, so if the program stops failing after disabling the D455 projector then it could suggest that the laser is drawing more power than the computer can provide to the camera to meet its power requirements. |
Thanks for the reply, setting the laser power to 0 did not improve things. The same hardware setup ran quite stable before. But we rewrote our driver, actually simplifying things, and updated the SDK and firmware to latest. So I cant trace it back to a single change. |
If you swap the USB cables of the D405 and D455, does the D455 then work but the D405 doesn't. If this happens then it would indicate a possible problem with the D455's USB cable. |
I tried different cameras as well as different cables, no difference. When compared to debian, in ubuntu it sometimes gives an exception (also pointing to set_power_state) instead of a segfault. |
Trying and altering a minimal example, I found a possible root cause.
provokes the set_power_state fails. When instead setting the depth resolution directly, the startup is fine:
This works for now. But in a more complex scenario, e.g. needing the advanced mode to set depth clamping, it will not. |
Instead of using Advanced Mode's depth clamping, I would recommend defining a minimum and maximum depth clamp with the Threshold Filter post-processing filter, like the example C++ code at #7771 I also confirm that setting the depth units with RS2_OPTION_DEPTH_UNITS is preferable to doing so via the depth table. I note that you are setting the depth units to 0.001. This is unnecessary as the camera already uses the 0.001 depth unit value by default. |
Thanks to your comments @MartyG-RealSense , we probably dont even need advanced mode then. To your comment about setting depth units to the default value: We just make sure the parameters are right at every startup. |
Some RealSense users do prefer to set the default parameter values even though they are applied automatically anyway in order to provide reassurance of correct settings, so it's totally fine to do so. |
As for the original problem, I updated the title, so that this might help future bug hunters. The problem was to call So, while in our case, not using advanced mode was the solution. A better patch here is to set up the So, if anybody needs to use advanced mode: First, check if enabled already as its persistent once activated. If not, toggle to true. Take your time and reconnect to the device, once its back up. (Timings: After 1.5s we get notified about the device disconnect, after another 2s it comes back up) Maybe as last remarks:
Thanks for caring and no more assistance needed with this. |
You are very welcome. Thanks so much for the detailed feedback for the benefit of other RealSense users. As you do not require further assistance, I will close this case. Thanks again! |
Edit: By now, we found out the root cause was to call
toggle_advanced_mode()
. It resets the camera and consecutive calls will run into an undefined hardware state.Issue Description
When calling pipe.start(config) the application crashes every 2nd or 3rd time, but never consecutively.
Stack Trace:
We run the same code with a D405 which runs just fine.
The text was updated successfully, but these errors were encountered: