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()
{
printf("CameraServer being started\n");
CameraServer::GetInstance()->SetQuality(50);
//the camera name (ex "cam0") was verified through the roborio web interface
CameraServer::GetInstance()->StartAutomaticCapture("cam0");
}
We are getting the following error message (repeatedly):
Quote:
Error on line 188 of CameraServer.cpp: Incompatible State: The operation cannot be completed: Choose "USB Camera HW" on the dashboard
at CameraServer::Serve()
at /home/lvuser/FRCUserProgram() [0x29284]
at /home/lvuser/FRCUserProgram() [0x29110]
at /home/lvuser/FRCUserProgram() [0x28ea8]
at /home/lvuser/FRCUserProgram() [0x28d1c]
at /lib/libstdc++.so.6.0.20(+0xa2954) [0x411a3954]
|
And no image displayed. We tried restarting the driverstation, dashboard, and roboRIO but still get the error message. However the Error line on the dashboard USB WebCam control now says: "ERROR: roboRIO-230.local".
Any suggestions would be much appreciated. Thanks.