luxonis / depthai-experiments

Experimental projects we've done with DepthAI.
MIT License
837 stars 369 forks source link

Stereo Depth X_Link_Error #152

Open julianaddison opened 3 years ago

julianaddison commented 3 years ago

Hi,

I'm trying to run a NN model on the RGB preview stream and planned to use the stereo depth to generate the depth of each prediction. Seemed relatively straightforward but I've been encountering a _X_LinkError after adding the StereoDepth pipeline. The RGB pipeline with NN runs perfectly well.

RuntimeError: Couldn't read data from stream: '__rpc_main' (X_LINK_ERROR)

I've taken some steps to troubleshoot the error using the demo scripts. I have isolated it to a difference in depthai versions and am assuming it's compatibility issues between gen1 and gen2 but am uncertain. Do you have any idea what might be going on or how it can be resolved? Wondering if the Module 3 I have is not compatible with gen2's stereodepth?

Some context: I had to flash my device because of some issues and followed the steps in the documentation to setup it up again.


Device: DepthAI: RPi Compute Module 3 Edition

Troubleshooting Findings

  1. No errors with depthai.py. The depth value, z is present. This script is automatically started as soon as the device boots/starts. Depthai Version Installed: 0.0.10a Depthai Dev Version Installed: 8c6328c8acd1086542b47d09b4b192ec1143914c Untitled

  2. Run time error with _depthaidemo.py which was launched using test.py Depthai Version Installed: 2.5.0.0 Depthai Dev Version Installed: AttributeError: module 'depthai' has no attribute '__dev_version__' Screenshot 2021-06-28 at 2 29 02 PM

  3. Ran the gen2 camera demo https://github.com/luxonis/depthai-experiments/blob/f08e06c/gen2-camera-demo/main.py#L49. Both the _create_rgbpipeline() and _create_monopipeline() pipelines ran successfully but encountered the same _X_LinkError runtime error in the _create_stereo_depthpipeline() Screenshot 2021-06-28 at 3 47 35 PM

julianaddison commented 3 years ago

Hi,

Would anyone on team be able to help me the issue above?

Luxonis-Brandon commented 3 years ago

Sorry about the delay on this @julianaddison . I think @Erol444 should be able to help with this. We'll get you taken care of.

Erol444 commented 3 years ago

Hello @julianaddison , sorry about the delay, for some reason I didn't receive a notification for this issue. I promise we are more active on discord:) so gen1 and gen2 versions of the depthai library aren't compatible. CM3 is fully compatible with stereodepth (in fact with all features of the library). At 2. I believe you were using the new depthai library, but the old depthai repo code. Could you try to pull the latest commit from the main branch of the depthai repo (while having depthai==2.5.0.0 installed)? For 3. point, I just tried it out and doesn't throw error. Could you also check if the latest master branch of depthai-experiments works for you? Since from the link you posted it seems like you are using an old commit. If all that fails, could you try running an example from depthai-python/examples as well? Otherwise, it means there's a problem with either installation or the device itself. Thanks, Erik