-
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
D455 changing resolution and fps then depth stream start failure #2068
Comments
Hi @sink0918 Which RealSense ROS2 wrapper version and librealsense SDK version are you using, please? Support for ROS2 Galactic was first introduced in the most recent ROS wrapper version at the time of writing this, which is 3.2.2. This particular ROS wrapper version should be matched with librealsense SDK version 2.48.0 (there is not currently a wrapper version designed for librealsense 2.49.0). https://github.com/IntelRealSense/realsense-ros/releases/tag/3.2.2 |
Thanks very much for the log image. Your wrapper and librealsense SDK versions are correctly matched, the camera is being correctly identified as being on a USB 3.2 connection, and your custom stream configurations for depth and color have been accepted by the launch. Below the bottom line of the image - RealSense Node is up! - are there warning messages such as control_transfer returned continuously generating, or are there just a few messages and then they stop appearing? |
It keeps continuously generating, and when I use |
If the control_transfer returned warning is continuously generating like this then it can indicate that there is a serious communication problem with the device. In this particular case that problem seems to be limited to the RealSense ROS wrapper though, as the camera was performing normally for you in the RealSense Viewer program. Could you try changing the color and depth FPS in the launch from 90 FPS to 30 please to test whether the warning stops generating rapidly? |
It works now. But I still need 90fps image in my program, is there any solution? |
Does it help if you set RViz to use compressed data instead of raw, as described in #1510 (comment) |
Thanks very much for the images. Does reliability of depth streaming improve or worsen if you remove initial_reset:=true from your launch instruction? |
Doronhi the RealSense ROS wrapper developer suggests in #1040 that if you are able to stream depth and color at the rate expected, such as 90, then problems with doing so may be related to the capabilities of the computer hardware being used with the camera. What computer / computing device are you using, please? |
intel NUC8 i5-8259U |
That is an 8th generation i5 processor, so it should be a capable PC in terms of processor power. The majority of RealSense ROS users do not set their FPS above 30, so there are few references about the performance that can be expected with 60 or 90. In the rs_launch.py launch file, it is indicated that the infrared channels infra1 and infra2 are enabled. If you do not require infrared then you could therefore try disabling the infra streams to see whether it improves performance by adding the commands below to your roslaunch instruction: enable_infra1:=false enable_infra2:=false For example: ros2 launch realsense2_camera rs_launch.py align_depth:=true color_width:=640 color_height:=360 color_fps:=90.0 depth_width:=848 depth_height:=480 depth_fps:=90.0 initial_reset:=true enable_infra1:=false enable_infra2:=false |
I have tried And I wonder if it is the performance problem, why there will be chances that 90 FPS streams work perfectly well? |
Could you monitor what the CPU usage percentage is when launching to see how much load is being placed on the CPU. In Windows this can be done in the Windows Task Manager interface, under the 'Performance' tab. If you are using Ubuntu then a system monitoring tool such as htop could be used. |
I conducted extensive further research but do not have many other suggestions to make. Because 90 FPS is used so few times in the history of the RealSense ROS wrapper, I don't feel that I can give guarantees that this speed will be achievable with stability in the wrapper when using it with both depth & color and with alignment. Do you see any improvement at 90 FPS if you add the term enable_sync:=true to your roslaunch instruction? This command gathers closest frames of different sensors, infrared, color and depth, to be sent with the same timetag. |
My launching command is
and there is no improvement. |
At this point I will highlight your case to Doronhi the RealSense ROS wrapper developer to seek input. Thanks very much for your patience! |
Hi @sink0918 I have received advice from Doronhi. May I ask which installation methods you used to install the librealsense SDK and the RealSense ROS wrapper, please? |
Firstly I install RealSense ROS wrapper using Then install librealsense using (in order to use realsense-viewer) |
This sounds like what Doronhi thought you may have done in the advice that he provided (install the ROS wrapper from Debian packages and separately install librealsense from packages). The correct order of installation when installing librealsense and the ROS wrapper separately is to install librealsense first and the ROS wrapper secondly. So if you installed librealsense again after having installed the SDK and wrapper together with Method 1, then the ROS wrapper would need to be built again from source code using Method 2. This is because each time that the librealsense version is changed, the ROS wrapper has to be built again. |
I have tried the Method 2, building it from the source code, (also tested purging librealsense and ros2 wrapper then re-installing them in the correct order you mentioned using apt) but there is no improvement. Could you please test it on your device to see if it is possible to use D455 in ROS2 wrapper with both color and depth streams of 90fps? |
I will pass your results back to Doronhi to seek further advice. Thanks very much for your patience. |
Hi guys. As I don't currently have a NUC at my disposal I tested it using a VMware machine installed on my laptop (Intel i7-8850H with 48GB RAM).
@sink0918 , Do you see the same error messages when you run realsense2_camera as you did at the beginning of this post, before you reinstalled the wrapper? |
You should remove the debian installation of both realsense2-camera and ros-XXX-librealsense:
Then rebuild from source - delete your "build" and "install" directories in the ros2_ws directory and build - |
It works! Thank you! @doronhi But I have one more question, now the version of LibRealSense that RealSenseCameraNode runs with is v2.49.0. So if I want to install the ros2 wrapper on a brand new device to use realsense with 90 FPS streams, does it mean that I have to build it from source code with the latest LibRealSense? Also, I want to make sure that what caused my problem. Thanks again. |
As for making sure that that's what caused the problem - it fits well with my guess and reproduction so we can assume the root cause is using RSUSB backend instead of v4l backend. |
Thank you for your answer. |
Hi,
Unfortunately, at this point, I don't know. |
Here is a new issue with the v4l backend, when I check the imu data (using Example (at about 9s in the clip) : camera.yaml.-.ros2_ws.SSH_.192.168.1.11.-.Visual.Studio.Code.2021-09-23.23-47-50.mp4 |
Hi @sink0918 Does your IMU performance improve if you set unite_imu_method to copy instead of linear_interpolation |
Yes, using |
Excellent news that using 'copy' was helpful, @sink0918 :) |
Hi @sink0918 Do you require further assistance with this case, please? Thanks! |
I'd like to know why |
My understanding is that when using linear_interpolation, the message is liable to vary, whereas copy is more stable. Doronhi provides further description of the differences between the two modes in #598 (comment) |
Hi @sink0918 Do you require further assistance with this case, please? Thanks! |
I have no further question, thank you for your support! @MartyG-RealSense |
Thanks very much @sink0918 for the update! As you have no further questions, I will close the case. Thanks again :) |
ROS Version:
Galactic
Reproduce:
ros2 launch realsense2_camera rs_launch.py align_depth:=true color_width:=640 color_height:=360 color_fps:=90.0 depth_width:=848 depth_height:=480 depth_fps:=90.0 initial_reset:=true
When I tried a lot of times, it might work once. But usually, it would be:
Firstly, lots of
[realsense2_camera_node-1] 07/09 17:38:46,957 ERROR [140509972518656] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 130
[realsense2_camera_node-1] 07/09 17:38:46,995 WARNING [140510106736384] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 07/09 17:38:47,291 ERROR [140509972518656] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 130
Then
[realsense2_camera_node-1] [WARN] [1631007527.596733736] [RealSenseCameraNode]: Hardware Notification:Right MIPI error,1.63101e+12,Error,Hardware Error
[realsense2_camera_node-1] [WARN] [1631007528.598045021] [RealSenseCameraNode]: Hardware Notification:Depth stream start failure,1.63101e+12,Error,Hardware Error
[realsense2_camera_node-1] [WARN] [1631007530.600105719] [RealSenseCameraNode]: Hardware Notification:Depth stream start failure,1.63101e+12,Error,Hardware Error
And I can't see the depth stream in
rviz2
orrqt_image_view
.By the way, the camera D455 work well in this setting
color_width:=640 color_height:=360 color_fps:=90.0 depth_width:=848 depth_height:=480 depth_fps:=90.0
in realsense-viewer.The text was updated successfully, but these errors were encountered: