![]() |
C++ USB Camera Errors
Hello!
My team is attempting to use the Microsoft LifeCam HD-3000 USB camera on our robot; however, we are encountering error messages in the driver station. We have tried to use the Simple Vision example code (unaltered), but it isn't working. We have verified that we can see the camera on the web based configuration page and that we are using the correct name in the code (we are). The code builds fine, but as soon as we upload to the robot, we are receiving the error message: "Error on line 188 of CameraServer.cpp: Incompatible State: The operation cannot be completed: Choose "USB Camera HW" on the dashboard at CameraServer::Serve()" We program in C++ and use the C++ SmartDashboard. We did add a USB Webcam Viewer object to SmartDashboard, but it only shows the standard gray background with an "ERROR" pink strip at the bottom in its area. Any fixes/ ideas? |
Re: C++ USB Camera Errors
We got this to work by exiting the driver station and dashboard, reseting the roborio
and restarting the driver station. After selecting usb camera hw, it started working. The exact line in the c++ code is complaining about the camera client making a request not in hardware compression mode (req.compression != kHardwareCompression). |
Re: C++ USB Camera Errors
We are having this same problem. We are coding in C++ and using the SmartDashboard.
We added the following to our code: Code:
void TalonXVI::RobotInit()Quote:
Any suggestions would be much appreciated. Thanks. |
Re: C++ USB Camera Errors
We are using C++ and the USB camera as well. There are a couple of things we have done to get video in the C++ dashboard.
1. Make sure you have the patched widget located here: http://www.chiefdelphi.com/forums/sh...d.php?t=134404 2. When you start the driver station, start the default dashboard and then make sure you have USB Camera HW selected. You should see video in that dashboard. After you have video working there, switch to the C++ dashboard and add the patched widget to the dashboard. I believe that will work - that's from memory. Let us know if that works. |
Re: C++ USB Camera Errors
Quote:
|
Re: C++ USB Camera Errors
So we had it working and now it does not work again after running without it on the robot for other testing (it was not securely mounted so we didn't want to damage it). Any advice? Do we have to go through the whole process (with the Labview dashboard and then changing over to the C++ SmartDashboard) each new time we bring up the robot with the camera? Do we need to reboot the driverstation after the camera is added?
Thanks |
Re: C++ USB Camera Errors
Quote:
|
Re: C++ USB Camera Errors
Quote:
This is much harder than it should be. |
| All times are GMT -5. The time now is 12:33. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi