Configuring a camera to work with the FRCVision RPI image

My team is currently looking into using RPI’s for vision this year. We have the new pre-configured image setup and are trying to get it to work with this camera (we aren’t planning on using this at competition but just happen to have it on hand). In the vision settings tab, I see the options for adding a camera but am unsure of what to do.

I’ve not tested with the Pi camera, but it should be enabled by default. If it’s the only camera hooked up, it should just work out of the box. Have you tried clicking on the “View Stream” button for the first camera? (Path of /dev/video0).

It tells me the site cannot be reached. (I deleted the original one, is there another setting I need to set?)

I can now see the page with all the settings but the image for the camera doesn’t show anything.

I can see something if I open the image in a new tab but it you can only make out faint movement when I wave my hand over it.

If you deleted the original one, you need to re-add it and save the settings page. The key parameter is the device path, which should be “/dev/video0” for the first camera.

If you go to the “vision status” tab after saving and enable the console, you’ll get console output from the vision program as well, which would also help debug.

In a future release I will add camera discovery to the web dashboard to make it easier to add cameras.

I got all the settings figured out. Is there any way to have the stream viewer on the setting page display properly? I have to open it in a tab (frcvision.local:1181/stream.mjpg) to see it

Ok sounds like you’re getting a stream now. You may need to adjust the camera settings (the page with the live view has all the available settings), or change the resolution (which can be done on the web dashboard page; available resolutions are shown in a table on the stream page).

It’s odd that you don’t see the stream on the settings page. What browser are you using?

Chrome. It looks like if I have the stream open in another tab it will work if I refresh the settings page, but once I close the tab with the stream and refresh the settings page it stops again.

Odd. Can you try with Firefox? We can move this discussion to a GitHub issue as well if you want to open one on the FRCVision repo.

I’ll open one right now

1 Like

Also, what is the username and password for using ssh? And where would I find the code for the dashboard site on either the PI or Github?

The default user/password is the same as for other raspbian raspberry pi’s. Username “pi”, password “raspberry”.

Here is the source code for the web dashboard. It’s not installed on the Pi.

So if I wanted to add my own changes, how would I deploy them?

You’ll need to clone the repo with your edits in Linux or a Linux docker image, and run the shell scripts in the deps folder in order (01-download, 02-extract, 03-build). Once you’ve done these steps once, you just need to run make in the tools directory if you make additional changes. The resulting executable to copy to the Pi is called rpiConfigServer. You will need to stop the running service with svc -d /service/configServer to overwrite the installed executable or run your own; note it needs to be run as root.

And where would I copy the executable to?

/usr/local/sbin/configServer. See my edited message above regarding using svc to shutdown the service so you can overwrite the executable. You can then use svc -u to re-enable it.

And if you do something cool, be sure to submit a pull request.


What would I do to enable WIFI on my RPI? I tried using WIFI sharing on my Windows laptop while connected to ethernet but couldn’t connect to frcvision.local if WIFI was enabled on my laptop. I also tried configuring my country location on the RPI to enable WIFI but was getting an error.

WiFi was disabled by default because it’s not allowed on FRC robots for competition. To re-enable it for home testing, ssh in and delete /etc/modprobe.d/raspi-blacklist.conf and then reboot.

Note that the filesystem is read-only by default to protect against SD card corruption, so if you’re trying to make changes via ssh, you need to run the “rw” Command after logging in.