Our team has been looking into using Roborealms this year but we are having issues.
We can’t seem to get a USB camera image over to Roborealms. We can get the feed to show up at the Default Driver station by using StartAutomaticCapture.
I browsed some of the C++/Java forum sections and saw multiple mentions of not using automatic capture but instead using setImage from the cameraserver object. They all mention an intermediate code example (which I don’t have since we are not using c++/Java). We are a bit stumped about how we can get the image to feed into setImage.
I browsed some of the C++/Java forum sections and saw multiple mentions of not using automatic capture but instead using setImage from the cameraserver object. They all mention an intermediate code example (which I don’t have since we are not using c++/Java). We are a bit stumped about how we can get the image to feed into setImage.
Does anyone have any ideas?
The USBCamera stuff in python is going to be very low performance, and I wouldn’t recommend using it. Instead, I would recommend using mjpg-streamer (see GitHub - robotpy/roborio-packages: Build files for RobotPy ipk packages for more information on installing packages), and it appears that the HTTP_READ module in RoboRealm will support this type of stream (their docs: HTTP Read).
Let me know if it works, and we can add notes to the mjpg-streamer notes.
We have updated our RoboRIO image and Driverstation. BTW, that compatibility issue github link doesn’t seem to work.
I was hoping to not have to do anything super special to get this to work. This will be the first time since 2006 our team is attempting to do any type of image processing so we don’t really know what we are doing. If we have to do something special though we will certainly attempt it.
I’ll see about trying out the mjpg-streamer (I’ll have to read up about installing packages at that link you gave since I have never done that before).
We loaded mjpg-streamer onto our Roborio and are able to see the stream at the default page (http://roborio-1288-frc.local:5800) when connected via USB to the roborio.
However, we hit a wall with HTTP_Read since we do not know what url to use that leads to a direct jpeg image. The default url has all html pages.
The HTTP_Read documentation states that "The HTTP_READ module does NOT read HTML pages. You need to provide it with the specific url that will return a jpeg image. If will understand both moving jpeg images (mjpg) OR still jpeg images that refresh each time they are reloaded. "