2024-08-18 14:05:23 -04:00
# Filesystem Directory
2024-11-14 22:56:02 -05:00
PhotonVision stores and loads settings in the {code}`photonvision_config` directory, in the same folder as the PhotonVision JAR is stored. On supported hardware, this is in the {code}`/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.
2024-08-18 14:05:23 -04:00
## Directory Structure
The directory structure is outlined below.
```{image} images/configDir.png
:alt: Config directory structure
:width: 600
```
- calibImgs
2024-11-14 22:56:02 -05:00
- Images saved from the last run of the calibration routine
2024-08-18 14:05:23 -04:00
- cameras
2024-11-14 22:56:02 -05:00
- Contains a subfolder for each camera. This folder contains the following files:
- pipelines folder, which contains a {code}`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
2024-08-18 14:05:23 -04:00
- imgSaves
2024-11-14 22:56:02 -05:00
- Contains images saved with the input/output save commands.
2024-08-18 14:05:23 -04:00
- logs
2024-11-14 22:56:02 -05:00
- Contains timestamped logs in the format {code}`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.
2024-08-18 14:05:23 -04:00
- hardwareSettings.json
2024-11-14 22:56:02 -05:00
- Contains hardware settings. Currently this includes only the LED brightness.
2024-08-18 14:05:23 -04:00
- networkSettings.json
2024-11-14 22:56:02 -05:00
- Contains network settings, including team number (or remote network tables address), static/dynamic settings, and hostname.
2024-08-18 14:05:23 -04:00
## Importing and Exporting Settings
The entire settings directory can be exported as a ZIP archive from the settings page.
```{raw} html
<video width="85%" controls>
<source src="../../_static/assets/import-export-settings.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
```
A variety of files can be imported back into PhotonVision:
- ZIP Archive ({code}`.zip` )
2024-11-14 22:56:02 -05:00
- Useful for restoring a full configuration from a different PhotonVision instance.
2024-08-18 14:05:23 -04:00
- Single Config File
2024-11-14 22:56:02 -05:00
- Currently-supported Files
- {code}`hardwareConfig.json`
- {code}`hardwareSettings.json`
- {code}`networkSettings.json`
- Useful for simple hardware or network configuration tasks without overwriting all settings.
2025-01-02 21:44:50 -06:00