I have been struggling to get the USB Camera to work with the RoboRIO for a long time. Now that I see that the new game has many obstacles that make it hard for the driver to see, I desperately want the camera to work. I was reading the Game Manual for this year and I saw under 2.4 Section this:
A. TCP 1180: Camera data from the roboRIO to the Driver Station (DS) when the camera is connected the roboRIO via USB, bi-directional.
So that got me wondering if I could do roboRIO-4480.local:1180 and see if the camera itself isn’t working? Also, we have the Logitech C270, is the light supposed to turn green on the webcam when you turn on the robot? Our webcam doesn’t(but it does when you use it on a computer).
Many thanks! Can’t wait to start building the actual robot!
In your robot code, you have to use the CameraServer class, which will stream the images from your camera to your driver station. The robot does not do this by default.
I did implement the changes in that thread, but I ended up with the same problem. Could it be that our webcam is not supported(Logitech C270)? Maybe next time I should try on a computer that has a Linux distro and see if it works there…
I just tried out the USBCamera class RobotPy 2016.0.0 with the default LabVIEW dashboard, and it doesn’t work. Looking at tcpdump, the RoboRIO seems to be rejecting the incoming connections for some reason.
I’ll debug this for a little bit, but honestly as I’ve said before the CameraServer stuff in python is really terrible, and if I can’t get it to work relatively quickly then I’ll probably remove it from the next release.
Well, one possibility is that you don’t have pynivision installed. I didn’t have it installed, and there was no way to know that it was using the ‘dummy camera’ instead of the real camera.
When I install pynivision, I get a “Connection reset by peer” error. The problem is that when the LabVIEW dashboard connects to the server and it encounters the wrong version of networktables (we haven’t upgraded to 3.0 yet), it disconnects from the camera. When I block the NetworkTables connection, then the camera works fine.
It’s pretty terrible, the CPU usage is at 51% without the robot code actually doing anything (as compared to ~7% without the camera code). I wouldn’t recommend using it, and I suspect we’ll remove the camera stuff from the next release.
yes it’s legal and you can actually make that camera work directly as a stand in to the axis cameras with the roborio(and older crio) with code modifications of the axis libraries(not easy though)
That’s what we did a few years back after we blew up our axis cameras and weren’t going to spend the money it took the replace them
Just a fair warning from a New York team. Some regionals have extreme bandwidth issues (New York being one of the most extreme examples). One year(I think 2014) a lot of teams did exactly what you described (using a camera to stream to the driver station) and it created huge amounts of field lag. The event staff had to force everyone to turn off their camera streaming. Probably not relevant to most regionals but if you’re reading this thread, it’s probably a good idea to talk to other teams at your regional to see if this issue has happened before. If so, it’s best not to rely on the camera feed.
The Javits center really needs to start being more accommodating they know it’s a not for profit holding an extremely expensive event. Last year there were similarly sized halls empty at the time so it’s not like it was going to get rented out by someone else.
The rules say that you can use 7Mbit/s. If you stream large images at high bitrates, then yes, it will cause field lag, and the FTAA will notice and tell you to fix your camera settings or turn it off. If you stream small images at low bitrates, you’ll be fine. See the FMS whitepaper for details.
Last year, we had two 160x120 streams at 10fps, and had no issues reported.
I just uploaded an ipk of mjpg-streamer. If you just want to view the image without modifying it, it’s pretty straightforward. I’ll try to write up some more documentation on it at some point.