-
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
Camera does not (re-)start after "failed to set power state" exception #2281
Comments
Hi @stwirth A few RealSense users who have recently had stability issues have found that their problem was resolved if they used kernel 5.11.0-34-generic |
I will test with that kernel and report results. Independent of the results, I think the re-connection logic should be modified to retry here. |
Tested again with kernel |
How are you launching the cameras, please? Are you using a roslaunch instruction, and if you are, have you tried including initial_reset:=true in the roslaunch instruction to reset the camera at launch? |
I can reproduce this issue with
|
I recall that in past cases with detection involving a pair of cameras, one approach was to create a sleep delay between the cameras being launched instead of all of them being launched simultaneously. #1187 (comment) provides a table of extensive testing of different methods, including a sleep period between launches, that one RealSense ROS user created. #774 (comment) has an example of launch file code for defining a launch delay for the second camera. |
Here is a script that repeatedly launches two cameras and checks if they are streaming: https://gist.github.com/stwirth/4fcd3462dbca929d008a742b52900e36
The gist also contains the full log of 50 iterations. |
Have you tested your project with an RSUSB backend build of librealsense, as described in #1734 (comment) to determine whether bypassing the kernel with RSUSB can resolve your multicam launch problem? |
I'm already using the RSUSB backend. @doronhi enabled that by default for the ROS build: https://github.com/IntelRealSense/librealsense2-release/blob/release/noetic/librealsense2/2.50.0-1/CMake/lrs_options.cmake#L33 |
If you are using a librealsense build based upon RSUSB then the kernel should not be an influencing factor in the problem, since an RSUSB build of librealsense is not dependent on Linux versions or kernel versions and does not require patching. Did you build librealsense and the wrapper together from packages using the Method 1 instructions in the wrapper documentation? Whilst RSUSB can make use of multiple cameras, it is not the ideal backend to use for multicam and a non-RSUSB build (native / V4L backend) from source code and patching the kernel is preferable for multicam applications. Which computer / computing device are you using, please (Nvidia Jetson, Raspberry Pi, laptop / desktop PC, etc) |
We build librealsense2 and realsense2_camera from the source that is contained in the release repositories (https://github.com/IntelRealSense/librealsense2-release and https://github.com/IntelRealSense/realsense-ros-release). Patching the kernel would not an option for us at the moment. The processor is an AMD Ryzen Embedded V2516. |
RealSense users have reported being able to use the camera with AMD Ryzen Threadripper processors in the past, though we do not have confirmation of Ryzen Embedded. |
Thanks @MartyG-RealSense for your effort. |
Thanks very much @stwirth for the positive report about the success that can be achieved by implementing a launch delay period. If a RealSense user is able to create the proposed code change then they are welcome to submit it to the RealSense ROS development team as a Pull Request (PR) so that it can be considered for merging into the wrapper. https://github.com/IntelRealSense/realsense-ros/pulls |
Hi @stwirth Do you require further assistance with this case, please? Thanks! |
No, I have a workaround and won't work on a "real fix" in the near future. Thanks for the assistance @MartyG-RealSense! |
Thanks very much @stwirth for the update! |
Very similar to #1734 I am seeing occasional failures of bringing up two RealSense D410 cameras at the same time. This can be reproduced in about 20-40% of all power cycles.
Some system information:
Ubuntu 20.04
ROS noetic
realsense2_camera version: 2.3.2
When the failure happens, the corresponding node logs:
which are emitted in these lines:
realsense-ros/realsense2_camera/src/base_realsense_node.cpp
Line 952 in f400d68
realsense-ros/realsense2_camera/src/realsense_node_factory.cpp
Line 394 in f400d68
Afterwards, the node is still pingable with
rosnode ping
but no images are published.A call of the reset service
rosservice call /camera_down_orig/driver/reset
successfully brings the camera back to a working state.So I think independent of what the cause for the "failed to set power state" exception might be, the bringup logic in
RealSenseNodeFactory::initialize
does not retry enough.Maybe
_device
should be reset after L394 inrealsense_node_factory.cpp
?The text was updated successfully, but these errors were encountered: