![]() |
Urgent- Python USB Camera not working
I'm having difficulty getting the MS Lifecam to show up on our robot. We have an axis camera currently, that's working great, but I can't get a second USB cam setup. We want a rear-view camera to help with intake, but we're having issues.
Current code: camera = wpilib.USBCamera() camera.startCapture() server = wpilib.CameraServer() server.startAutomaticCapture(camera) When I go onto the Roborio, I can see the lifecam plugged in and recognized on it's web interface. However, even by going to the default dashboard, I can't get any image on the DS. Am I missing something? |
Re: Urgent- Python USB Camera not working
You might check that the roborio didn't give your camera a different name. The default name for the camera that the code you have there assumes is 'cam0'.
Last year we had an issue where, when testing different cameras, the roborio would increment the number of the name given to the camera (cam1, cam2, etc.) We solved this by doing something similar to the following and then using the default dashboard set to HW capture: Code:
camera = wpilib.USBCamera(b'cam1') |
Re: Urgent- Python USB Camera not working
Quote:
|
Re: Urgent- Python USB Camera not working
If you're using the LabVIEW dashboard, you have to have the beta version of pynetworktables installed, or it will not connect. See https://github.com/robotpy/robotpy-wpilib/issues/172
|
Re: Urgent- Python USB Camera not working
We spent a bunch of time trying to get the USB camera to work correctly. The result was a very laggy robot. No joke, it was around 1-2 seconds of delay with the camera enabled. Then one of our guys discovered a post in the forum about using mjpg-streamer instead. It was super easy to install and works like a champ! There is also a smart dashboard plugin that allows you to have direct dashboard output. You can find more info here: https://robotpy.github.io/2016/01/14...r-for-roborio/
|
Re: Urgent- Python USB Camera not working
Quote:
This is exactly what we found last night, at 11:30 pm. We got the camera working, but lag was horrendous. By dropping the quality, we got the lag down to about half a second, but still not usuable. I pulled the camera off, and will be working on getting mjpg-streamer setup. Are you running yours off the RoboRio, or off like a raspberry pi? I do have a spare roboRio we ordered I can practice the setup on, so that when we get to competition I can quickly deploy it. |
Re: Urgent- Python USB Camera not working
Quote:
|
Re: Urgent- Python USB Camera not working
In 2017, I'll be removing the CameraServer class in python and throw an exception telling the user to use mjpg-streamer instead. As you've seen, it's very low performance, and is just a lot of trouble in general.
|
Re: Urgent- Python USB Camera not working
Quote:
|
Re: Urgent- Python USB Camera not working
Quote:
I'm having some trouble installing this. I'm using our backup roborio, and made sure it's all up to date. I download the opkg file using the installer.py and then attempt to install it on the RoboRio via the installer as well. However, I get the error that libjpeg8 packages are found, but are not the right arch. However, they are listing as cortexa9. Is there a trick to this? or should I try the online install? |
Re: Urgent- Python USB Camera not working
Quote:
|
Re: Urgent- Python USB Camera not working
Bah, I did the firmware, but missed the image. I am dumb.
|
| All times are GMT -5. The time now is 19:50. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi