Stream from Jetson to RIO


#1

Hello Chief,

My team is working on streaming from the Jetson with the cscore library. So far, we have been able to stream from the Jetson and open the stream on a browser, but we cannot get the stream to show in the Driver Station Dashboard. We have tried using the code below to no avail, and we know that the driver station laptop can view the stream through the browser, but we cannot view it through the dashboard. Is there something we are missing here?

    HttpCamera jetsonCamera = new HttpCamera("outputServerStream", "http://10.53.32.12:5800/?action=stream");
    jetsonCamera.setConnectionStrategy(VideoSource.ConnectionStrategy.kKeepOpen);

    CameraServer.getInstance().addCamera(jetsonCamera);
    CameraServer.getInstance().startAutomaticCapture(jetsonCamera);

Thanks,

Jonathan Daniel


Using Jetson for image compression
#2

When you say you can’t view it through the dashboard, do you mean that the camera isn’t listed, or the camera is listed but doesn’t work?

If the former, there is a bug in CameraServer where cameras constructed prior to the first getInstance() call aren’t published. The easiest way to fix this is to call CameraServer.getInstance() prior to constructing the HttpCamera.

Also, you shouldn’t need to keep open the jetsonCamera, and startAutomaticCapture() calls addCamera() internally.

So try the following:

CameraServer cs = CameraServer.getInstance();
HttpCamera jetsonCamera = new HttpCamera("outputServerStream", "http://10.53.32.12:5800/?action=stream");
cs.startAutomaticCapture(jetsonCamera);

Method to get axis camera feed
#3

I just tried your solution and now the camera is listed, but I sitll cannot get the RIO to accept the stream. When I try loading it through the default dashboard, it jumps between the messages below:

“Connecting to 10.53.32.12”
“Connecting to 172.22.11.2”
“Server Connection Lost”

I can still view the stream through an outside browser, so is there something else I am missing here? The browser stream is outputting a 465x360 stream in MJPEG format at 30 FPS.

Thanks,

Jonathan Daniel


#4

It might be an issue with the LabView dashboard. Have you tried with one of the other dashboards (e.g. Shuffleboard or SmartDashboard)? What are you using on the Jetson to stream?


#5

I have not tried it with the other dashboards. I did open shuffleboard, but it wasn’t picking up the stream as a camera source, so my testing ended there. Also, I am using the cscore library to stream the camera from the Jetson.


#6

Note you have to set Shuffleboard up with your team number so it can connect and get the camera list.

It’s puzzling that it doesn’t work from the default dashboard however, as that interoperation has been tested quite extensively. It might be the odd resolution?


#7

I just tried it with the default dashboard and it’s still not displaying the stream. The browser is picking it up as a 640x480 stream at 30 FPS. The dashboard is still displaying the same two connecting messages.


#8

Also is there a way I can check this stream against the network requirements for bandwith even though I cannot read it through the driver station dashboard? We may just use the browser window.