PhotonVision install on Romi

I’ve installed PhotonVision on the Romi following these instructions. When I start the server I get the errors shown below.
I’ve tried placing the Romi filesystem in Writable mode but that didn’t help. I know that photonvision is started on reboot, so I stopped the running photoVision process before I ran the following command see what was going on. I also tried this on a Pi 3 and 4. Any help would be appreciated. I’ve spent about three hours trying to diagnose issue and I’m out of ideas. Thank you.

pi@wpilibpi(ro):~$ java -jar /opt/photonvision/photonvision.jar
[2021-11-27 15:15:22] [General - Main] [INFO] Logging initialized in debug mode.
[2021-11-27 15:15:22] [General - ShellExec] [DEBUG] Executing “id -u”
[2021-11-27 15:15:22] [General - ShellExec] [DEBUG] Got exit code 0
[2021-11-27 15:15:22] [General - Main] [INFO] Starting PhotonVision version v2022.1.1-beta-1 on Linux Raspbian
[2021-11-27 15:15:23] [Camera - PicamJNI] [ERROR] Couldn’t load libpicam shared object
java.lang.UnsatisfiedLinkError: /home/pi/lib/ cannot open shared object file: No such file or directory
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(
at java.base/java.lang.ClassLoader.loadLibrary0(
at java.base/java.lang.ClassLoader.loadLibrary(
at java.base/java.lang.Runtime.load0(
at java.base/java.lang.System.load(
at org.photonvision.raspi.PicamJNI.forceLoad(
at org.photonvision.Main.main(
[2021-11-27 15:15:23] [General - Main] [INFO] Native libraries loaded.
[2021-11-27 15:15:23] [General - ConfigManager] [INFO] Loading settings…
[2021-11-27 15:15:23] [General - ConfigManager] [INFO] Hardware config does not exist! Loading defaults
[2021-11-27 15:15:23] [General - ConfigManager] [INFO] Hardware settings does not exist! Loading defaults
[2021-11-27 15:15:23] [General - ConfigManager] [INFO] Network config file does not exist! Loading defaults
[2021-11-27 15:15:23] [General - PigpioSocket] [ERROR] Failed to create or connect to Pigpio Daemon socket
[2021-11-27 15:15:23] [General - PigpioSocket] [ERROR] Connection refused (Connection refused)
at java.base/ Method)
at java.base/
at java.base/
at java.base/
at java.base/
at java.base/
at java.base/
at java.base/
at java.base/
at org.photonvision.common.hardware.GPIO.pi.PigpioSocketLock.reconnect(
at org.photonvision.common.hardware.GPIO.pi.PigpioSocketLock.(
at org.photonvision.common.hardware.GPIO.pi.PigpioSocket.(
at org.photonvision.common.hardware.GPIO.pi.PigpioSocket.(
at org.photonvision.common.hardware.HardwareManager.(
at org.photonvision.common.hardware.HardwareManager.getInstance(
at org.photonvision.Main.main(

[2021-11-27 15:15:23] [General - NetworkManager] [INFO] Setting DHCP with team team 0
[2021-11-27 15:15:23] [General - NetworkManager] [ERROR] Cannot manage network without root!
[2021-11-27 15:15:23] [General - NetworkTablesManager] [INFO] Starting NT Client
[2021-11-27 15:15:23] [General - NetworkTablesManager] [ERROR] [NetworkTablesManager] Could not connect to the robot! Will retry in the background…
terminate called after throwing an instance of ‘std::out_of_range’
what(): basic_string_view::substr: __pos (which is 4294967295) > this->size() (which is 28)

1 Like

I ran into a very similar looking issue last week, but haven’t had a chance to debug it to root cause yet, hoping to get to it early next week.

I’m not 100% sure where the issue started, but moving back to 2021.1.7 or .6 might be a workaround for now?

The biggest thing to romi is that the image has to be in writable mode, otherwise the logging thread gets stuck right as photon starts up.

1 Like

You fixed that for version 2021.1.6 here :slight_smile:
Anyone running 2021.1.6 or later won’t have to be in writable mode.

As for the crash, it’s likely unrelated to the two exceptions above, but we’re unclear as to where it’s coming from at this time.


Bah, Off by two versions, thought it was only in .8 . You rock!

1 Like

Thanks for bringing this up! Looks like it’s a bug in WPILib. Tracked here:

You can give the previous non-prerelease jar a try?


I tried release v2021-1.8 and the UI now works, thank you. You do have to put it into Writable mode in order to create a new pipeline. I was able to create the pipeline but couldn’t figure out how to get it to send data to the Network Tables. I had the java program running the Simulator so the NTs were up and running. Also, there’s a TARGET INFO panel but it doesn’t display anything from the pipeline. I suspect that may have something to do with no NT data getting sent.

I really like what I see so far. It makes setting up a vision based program much easier. I can’t wait to try out the PhotonLib stuff. Please let me know how to get it to send the target data. I couldn’t find anything in the documentation.
Thank you.


If the target info panel is empty it sounds like your pipeline isn’t seeing any targets. Have you gone through the steps here to tune a pipeline? Pipeline Tuning - PhotonVision Docs