WPILibPi not sending both cameras to CameraServer

Hello all,

I’ve hooked up a Pi for USB cameras. I have the problem where only 1 of the 2 cameras are being shown in Shuffleboard in the cameras section. I know both of them are configured correctly, because I can see the stream through a web browser. How can I get both the feeds showing? Any help is appreciated.

Thanks

What version are you running? Are you using the builtin camera server or a custom vision program? There was an issue regarding this with 2023.1.1 that was fixed in 2023.2.1.

I’m using the latest, 2023.2.1, and the built-in multi-camera streaming it came with. This has been a recurring issue, and I am considering just using 2 Pis so our drivers can see.

Ok. In OutlineViewer, is there only one camera showing up in the /CameraPublisher tree then? You have named both of the cameras uniquely in the WPILibPi GUI? Could you post a copy of the WPILibPi’s /boot/frc.json file?

You can work around it not showing up by using the Shuffleboard API to add the camera URLs to a program-driven layout (addCamera()). The URL to use is the same one used for the video image in the web browser.

Yep, they’re both unique. It’s only showing one camera, that being the main camera.

{
    "cameras": [
        {
            "brightness": 50,
            "exposure": "auto",
            "fps": 7,
            "height": 480,
            "name": "Claw",
            "path": "/dev/video0",
            "pixel format": "mjpeg",
            "properties": [
                {
                    "name": "connect_verbose",
                    "value": 1
                },
                {
                    "name": "contrast",
                    "value": 50
                },
                {
                    "name": "saturation",
                    "value": 41
                },
                {
                    "name": "power_line_frequency",
                    "value": 2
                },
                {
                    "name": "sharpness",
                    "value": 50
                },
                {
                    "name": "backlight_compensation",
                    "value": 0
                },
                {
                    "name": "pan_absolute",
                    "value": 0
                },
                {
                    "name": "tilt_absolute",
                    "value": 0
                },
                {
                    "name": "zoom_absolute",
                    "value": 0
                }
            ],
            "stream": {
                "properties": [
                    {
                        "name": "width",
                        "value": 640
                    },
                    {
                        "name": "height",
                        "value": 480
                    },
                    {
                        "name": "fps",
                        "value": 30
                    }
                ]
            },
            "white balance": "auto",
            "width": 640
        },
        {
            "brightness": 49,
            "exposure": "auto",
            "fps": 7,
            "height": 480,
            "name": "Main",
            "path": "/dev/video2",
            "pixel format": "mjpeg",
            "properties": [
                {
                    "name": "connect_verbose",
                    "value": 1
                },
                {
                    "name": "contrast",
                    "value": 50
                },
                {
                    "name": "saturation",
                    "value": 41
                },
                {
                    "name": "power_line_frequency",
                    "value": 2
                },
                {
                    "name": "sharpness",
                    "value": 50
                },
                {
                    "name": "backlight_compensation",
                    "value": 0
                },
                {
                    "name": "pan_absolute",
                    "value": 0
                },
                {
                    "name": "tilt_absolute",
                    "value": 0
                },
                {
                    "name": "zoom_absolute",
                    "value": 0
                }
            ],
            "stream": {
                "properties": []
            },
            "white balance": "auto",
            "width": 640
        }
    ],
    "ntmode": "client",
    "switched cameras": [],
    "team": 6964
}