Intel RealSense D415 - Troubleshoot when several other serial devices are connected to rpi4
Hi
I have multiple devices communicating with rpi4 using serial communication. Everything was working fine, but when I connected the Intel RealSense D415 camera to the RPI4 all the sensors stopped working. As I understand it, the script to control the Intel RealSense D415 camera looks for all serial ports during the initialization step. This situation broke or reserved all the serial ports, causing my sensors to stop working. How can I configure the camera for a specific COM?
Also sometimes the camera stop to work as well: Timeout always 5 seconds
-
Hi Gabriel Brito May I ask some initial questions, please.
- Is the problem occurring when the camera is inserted into a USB port and is detected by the Pi 4, or does it only occur when a script accesses the camera?
- Do the affected serial communication devices use IR signals?
-
- If I only use the camera with rpi4, the camera works fine
- If I only use the other sensors that communicate using serial protocol with rpi4, the sensors work fine.
- If I connect everything to rpi4 (camera + sensors) but only run the script that communicates with the sensors, the sensors work fine.
The problem is now: - If I connect everything to rpi4 (camera + sensors) but run the script that communicates with the sensors + camera (using a different thread), everything stops working.
PS: one of the sensors that communicate via serial protocol is a SONAR sensor, so I believe it uses an IR signal. Other devices are telemetry devices, analog sensors with serial communication, etc...
-
Thanks very much for the information. I asked about IR devices because RealSense 400 Series cameras can interfere with nearby non-RealSense infrared devices during use, though the 400 Series camera does not experience interference in return from those non-RealSense infrared devices.
The IR Emitter of the camera (which is a separate component from the infrared sensor) can be disabled. Doing so may reduce the detail of the depth image, though if the scene that the camera is in has strong lighting then the camera can use the ambient light in the scene instead to analyze surfaces for depth detail.
Are the sensors and camera all being controlled from the same script, please?
-
The same script is communicating with the various sensors via the serial protocol (each device on a different serial port) and in that same script the camera is being initialized (which I think is creating a new thread).
If I comment out a line of code that initializes the camera, the sensors work correctly. If I use that line of code, everything crashes because the camera code must be trying to interact with all the serial ports, making all the communications shut-down.
As I understood the camera code does not specify a serial port. He runs all the serial ports looking for the camera. How can I solve this? I still think it does this all the time, because I tried to put the camera on serial port 0 and its initialization code right at the start, to ensure that after the first scan of all serial ports, I could start communicating with the others sensors, but that didn't work either.
-
all the serial devices works together when the camera is not enabled. The problem here is that the camera APIs are scanning all the serial ports to find the camera, making the comunication with the devices crash. There is any way to define which serial port the camera are conected too, making sure that API will not scan all the serial ports?
-
I am not familiar with how the Pi handles serial ports, so I apologize. If you want to set up a static serial port for each device, is the information in the links below useful for that?
https://www.raspberrypi.org/forums/viewtopic.php?t=300068
https://www.freva.com/2019/06/20/assign-fixed-usb-port-names-to-your-raspberry-pi/
-
This discussion is continued on the case posted on the RealSense GitHub forum at the link below.
Please sign in to leave a comment.
Comments
8 comments