stereolabs / zed-csharp-api

C# API for the ZED SDK
MIT License
10 stars 3 forks source link

Multi camera streaming receiver C# #4

Closed LudoTexx closed 3 years ago

LudoTexx commented 4 years ago

Hello,

Any idea about this "CAMERA_NOT_INITIALIZED" error? What the best way to restart streaming after this error without restart application ?

And, what about multi streaming receiver in C#, because i got an issue too, i explain :

I have made two windows in wpf :

First ZED3D : https://pastebin.com/vP8n7ZJB

Second, ZEDAR : https://pastebin.com/EwMChgwu

If i run a c++ test for checking streaming on my network i got this result :

[Sample] Detect: 2 ZED in streaming
* ZED: 29753160, IP: 192.168.1.58, port : 34000, bitrate : 4000
* ZED: 27242963, IP: 192.168.1.56, port : 30000, bitrate : 4000

if i run with just this :

camAR = new ZEDAR("192.168.1.58",34000);
camAR.Show();

I got the good camera streaming

if i run with just this :

cam3D = new ZED3D("192.168.1.56",30000);
 cam3D.Show();

I got the good camera too.

But if i run with both like this :

camAR = new ZEDAR("192.168.1.58",34000);
camAR.Show();

cam3D = new ZED3D("192.168.1.56",30000);
cam3D.Show();

I got the same video on both windows !! ( Always the video of the first one)

I that a bug ? I have try to change port but no results, exactly the same.

LudoTexx commented 4 years ago

Bump........

obraun-sl commented 4 years ago

Sorry for late reply. You need to specify the cameraID of ZEDCamera object for each object (0,1,...) to know which object is targeted in the C Interface.

Add in your code: zedCamera3D.cameraID = 0; and camAR.cameraID = 1;

LudoTexx commented 4 years ago

Hello, sorry i just send you an email about this error.

Awesome, thank you for your answer, i will try this right now !

And what about the "CAMERA_NOT_INITIALIZED" issue??

obraun-sl commented 4 years ago

No problem. For the camera not initialized issue, I have not yet reproduced (I mainly use the Unity plugin, but the interface is similar). I will try to reproduce directly in the C# wrapper. Do you have this with 1 or multiple camera stream ?

LudoTexx commented 4 years ago

This error come really randomly, that the problem, with one, two or three cameras. I use an RJ45 cat6 for ethernet communication.

Sometimes my program work like a charm for a full day (one camera 3D SbS, two others for object detection) and more, and sometimes, crashed after some minutes, or seconds.. without changing any cable, any code lines or something !

obraun-sl commented 4 years ago

Ok. And you don't have that behavior with C++ code, right ? (Note : I have updated the ZEDCamera constructor so that it takes the ID as parameter -- see last commit of sdk_3.2 branch)

LudoTexx commented 4 years ago

Thank you very much for your fast update, we appreciate that !

for being honest, i have not try multi camera receiver in c++ since we have rotate from the windows10 sender with Quadro P4000 issue to 4 Jetson NANO senders.

Did you want i try? What the source of the problem you think?

In fact, i use RJ45 cable directly pluged to ethernet hub for the dev of the project, but at the end we will use wireless radio encrypted system (army category)

30 at 300 Mbps of datas ( 3.75 Mo/s at 37 Mo/s) less than 2 ms of latency, communication range = 4 to 120 km.

Is that good you think?

Maybe need ot try with better ethernet cable?