You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UsbCamera camera = new UsbCamera("First Camera", 0);
MjpegServer server = CameraServer.startAutomaticCapture(camera);
there is no camera listed under the CameraPublisher key in NetworkTables -- indeed there is no CameraPublisher key at all.
To Reproduce
Start a camera server as part of a robot program with the code above. Connect to port 1181 and observe that the camera is working. Observe in Glass or OutlineViewer that there is no CameraPublisher key or camera-specific key for the camera.
Expected behavior
There should be an entry for the camera below the CameraPublisher key.
Testing with simulation on the desktop (but I have no reason to think the problem is related to using simulation)
Additional context
My goal with starting the camera this way was to be able to configure both the camera VideoMode settings and the stream default settings. The only obvious way to get your hands on the MjpegServer object where the stream default parameters can be configured is by using the startAutomaticCapture overload that has a VideoSource parameter and returns an MjpegServer.
While writing this issue report I figured out another possible way to gain access to the MjpegServer object:
UsbCamera camera = new UsbCamera("First Camera", 0); // the string is an arbitary name, 0 is the device number
MjpegServer server = CameraServer.addServer("First Camera");
server.setSource(camera);
but this approach as well leads to no CameraPublisher NT entry although there is a server running on port 1181 and if I change the camera VideoMode setting and the stream default settings with calls on the UsbCamera and MjpegServer objects the displayed video behaves as expected.
The problem posed by this is that there seems to be no way to set the default stream parameters -- which is potentially a convenient way to ensure consistent video stream behavior across different dashboard instances.
The text was updated successfully, but these errors were encountered:
Describe the bug
If I start a camera server with
there is no camera listed under the
CameraPublisher
key in NetworkTables -- indeed there is noCameraPublisher
key at all.To Reproduce
Start a camera server as part of a robot program with the code above. Connect to port 1181 and observe that the camera is working. Observe in Glass or OutlineViewer that there is no
CameraPublisher
key or camera-specific key for the camera.Expected behavior
There should be an entry for the camera below the
CameraPublisher
key.Environment:
Additional context
My goal with starting the camera this way was to be able to configure both the camera
VideoMode
settings and the stream default settings. The only obvious way to get your hands on theMjpegServer
object where the stream default parameters can be configured is by using thestartAutomaticCapture
overload that has a VideoSource parameter and returns anMjpegServer
.While writing this issue report I figured out another possible way to gain access to the
MjpegServer
object:but this approach as well leads to no
CameraPublisher
NT entry although there is a server running on port 1181 and if I change the camera VideoMode setting and the stream default settings with calls on theUsbCamera
andMjpegServer
objects the displayed video behaves as expected.The problem posed by this is that there seems to be no way to set the default stream parameters -- which is potentially a convenient way to ensure consistent video stream behavior across different dashboard instances.
The text was updated successfully, but these errors were encountered: