We have 2 USB cameras connected to the Rio. While they do show up in the standard dashboard as USB Camera 0 and USB Camera 1 as a result of me putting in the CameraServer commands (which I will put below) I have also have in the network tables a lot of USB Camera XXXXXXXX values that I can’t seem to clear. The effect is that we have numerous cameras that really are not connected anymore but are still selectable. Some of these entries appears to be aliases for the real cameras that are connected.
I have 2 requirements. We need the cameras to consistantly be picked as USB 0 and USB 1 and NEVER swap because the cameras will be looking in two different directions. Bad things will happen if the camera we think is USB 0 becomes 1 etc.
I am fine with using the USB camera’s serial number (which may be where these entries are coming from) if they are consistent and we can programicaly identify which one is which.
But see below what the Variables tab shows. Even after rebooting the rio and PCs running the driver station these entries return. Why are they sticking?
cs::UsbCamera camera =
camera.SetFPS(30); camera.SetResolution(320, 240); cs::UsbCamera camera2 = frc::CameraServer::GetInstance()->StartAutomaticCapture(1); camera.SetFPS(30); camera.SetResolution(320, 240);