We are currently trying to simultaneously stream from both the robot’s head camera and an external Realsense camera (D435i) that is plugged into the robot, and are running into some problems.
To do this, we first roslaunch the external camera via
roslaunch realsense2_camera rs_camera.launch camera:=camera_2 serial_no:=<serial number>, at a resolution of 1280x720 and at 6FPS. When we then attempt to roslaunch the head camera using
d435i_high_resolution.launch, the system becomes unresponsive and we have to restart the robot.
Each camera can be streamed individually, its when we try to stream from both that we run into this problem. We have tried simultaneous streaming from the same cameras using the same parameters on a different Stretch robot in the lab without issue. Any guidance you may have for resolving this issue would be greatly appreciated!
Hi @kpputhuveetil, I’ve got a few suggestions for debugging what’s happening here. First off, whereas the head Realsense camera is internally connected to a USB3 port, the external Realsense camera has only USB2 port options on Stretch RE1 (there are USB3 ports in the trunk if using Stretch 2). This can saturate the USB bus and cause the computer to become unresponsive. Try reducing the resolution and framerate of both camera when roslaunching to see whether the system still freezes. Monitor the CPU usage and temperature to determine if the CPU cannot keep up with the cameras’ streams. Additionally, quality and length of the USB cable connecting the external Realsense to Stretch can impact the performance of the system. I recommend trying a few well-known high quality cables (e.g. Realsense cameras typically ship with a high quality blue USB C cable).
In the past, we have seen Stretch’s onboard computer freeze a few seconds after starting the ROS Realsense drivers. This occurred on systems running Ubuntu 18.04 and a version of librealsense2 that uses the RSUSB backend. We wrote the installation scripts for Ubuntu 20.04 to ensure that the more stable version of librealsense2 was used. Upgrading your robot to 20.04 by following this upgrade guide may help here.