We are a first year Limelight (though the issue may not be Limelight specific) as well as a first year Shuffleboard team.
If we have shuffleboard open already with a Camera server stream, for some reason that widget does not get re-activated once the code is up and running again. We have to remove and then re-add the widget. When we do that, everything is fine and it works.
I was hoping to find out if there’s either a Shuffleboard config, or a programmatic way to have that widget automatically restart the image capture and display on the dashboard. I haven’t grok’d the WithWidget api well enough to figure out how to properly put the camera stream on there.
We will ultimately have a rear and forward facing camera, one plugged directly into the Rio and the other is a limelight. We will ultimately need to add both to our vision tab if we get it all working the way we want.
Thanks for any pointers, github links, or anything that can help.
Not yet, but I believe our students were going to be working on it tomorrow. I found some screensteps links that give a lot of the detail on how to do it I thin.
We’re starting this up as our first research task for next week, we got it sort of working by just using smartdashboard APIs.
It seems the Shuffleboard APIs should work, but you just need to wrap the calls in a try: catch() because it throws an exception if you try to put something on there on a tab that already has a key of that type.
I’ve tried this and it seems to crash our robot but, the second of these lines causes our robot code to completely crash.
limelightFeed = new HttpCamera("limelight", "http://10.3.22.11:5800/stream.mjpg", HttpCameraKind.kMJPGStreamer);
CameraServer.getInstance().startAutomaticCapture(limelightFeed);
I can access the camera at the actual IP address in a browser but, when we try to capture the video with a CameraServer, the RoboRio seems to get caught in a boot-loop where the code repeatedly tries to start but can’t. Am I doing something wrong?