Filesystem Directory
PhotonVision stores and loads settings in the photonvision_config
directory, in the same folder as the PhotonVision JAR is stored. On supported hardware, this is in the /opt/photonvision
directory. The contents of this directory can be exported as a zip archive from the settings page of the interface, under “export settings”. This export will contain everything detailed below. These settings can later be uploaded using “import settings”, to restore configurations from previous backups.
Directory Structure
The directory structure is outlined below.
calibImgs
Images saved from the last run of the calibration routine
cameras
Contains a subfolder for each camera. This folder contains the following files:
pipelines folder, which contains a
json
file for each user-created pipeline.config.json, which contains all camera-specific configuration. This includes FOV, pitch, current pipeline index, and calibration data
drivermode.json, which contains settings for the driver mode pipeline
imgSaves
Contains images saved with the input/output save commands.
logs
Contains timestamped logs in the format
photonvision-YYYY-MM-D_HH-MM-SS.log
. These timestamps will likely be significantly behind the real time. Coprocessors on the robot have no way to get current time.
hardwareSettings.json
Contains hardware settings. Currently this includes only the LED brightness.
networkSettings.json
Contains network settings, including team number (or remote network tables address), static/dynamic settings, and hostname.
Importing and Exporting Settings
The entire settings directory can be exported as a ZIP archive from the settings page.
A variety of files can be imported back into PhotonVision:
ZIP Archive (
.zip
)Useful for restoring a full configuration from a different PhotonVision instance.
Single Config File
Currently-supported Files
hardwareConfig.json
hardwareSettings.json
networkSettings.json
Useful for simple hardware or network configuration tasks without overwriting all settings.