Images are not in my imgSaves folder after calling both take snapshot methods in my code -- Photonvision

I am trying to use the Photonvision library for computer vision tracking. After setting up the pipeline in the Photonvision GUI, I wanted to take a picture to test if everything is working okay. However, whenever I export settings, images never end up showing in my imgsaves folder. I am totally lost because I don’t know what I’m doing wrong. Please help.

PhotonCamera camera;

    PhotonPipelineResult result;
    
    // RoxSwerveCam2021-4361 is the name of my camera
    camera = new PhotonCamera("RoxSwerveCam2021-4361");

    //camera.setPipelineIndex(0);

    camera.takeInputSnapshot();

    camera.takeOutputSnapshot();

There are network table entries that controls this: inputSaveImgCmd and outputSaveImgCmd can you see them toggling? Can you confirm that you are connected to the PhotonVision NetworkTables? Can you see other values changing?

You can get help directly from some of the most knowledgable people about PhotonVision on their discord too

Can you post a log file (from inside that .zip file)? There should be messages in it indicating whether photonvision attempted to perform a save operation or not. Something like this:

Feb 06 11:32:08 photonvision java[6366]: [2021-02-06 11:32:08] [General - FileSaveFrameConsumer - mainCamera] [INFO] Saved new image at /opt/photonvision/photonvision_config/imgSaves/mainCamera_output_2021-02-06T113208550.jpg
Feb 06 11:32:21 photonvision java[6366]: [2021-02-06 11:32:21] [General - FileSaveFrameConsumer - mainCamera] [INFO] Saved new image at /opt/photonvision/photonvision_config/imgSaves/mainCamera_output_2021-02-06T113221406.jpg
Feb 06 11:32:35 photonvision java[6366]: [2021-02-06 11:32:35] [General - FileSaveFrameConsumer - driverCam] [INFO] Saved new image at /opt/photonvision/photonvision_config/imgSaves/driverCam_output_2021-02-06T113235595.jpg

[2021-01-11 08:17:06] [General - Main] [INFO] Logging initialized in debug mode.
[2021-01-11 08:17:06] [General - ShellExec] [DEBUG] Executing “id -u”
[2021-01-11 08:17:06] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:17:06] [General - Main] [INFO] Starting PhotonVision version dev on Linux Raspbian
[2021-01-11 08:17:07] [Camera - PicamJNI] [INFO] Successfully loaded libpicam shared object
[2021-01-11 08:17:07] [General - Main] [INFO] Native libraries loaded.
[2021-01-11 08:17:07] [General - ConfigManager] [INFO] Loading settings…
[2021-01-11 08:17:07] [General - ConfigManager] [INFO] Hardware config does not exist! Loading defaults
[2021-01-11 08:17:08] [Camera - CameraConfiguration] [DEBUG] Creating camera configuration for UsbCameraMicrosoft LifeCam HD-3000 (AKA RoxSwerveCam2021-4361) at /dev/video0
[2021-01-11 08:17:09] [General - NetworkManager] [INFO] Setting DHCP with team team 0
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Executing “cat /etc/hostname | tr -d " \t\n\r”"
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Executing “echo 4361-RoxburySwerve2021-Robot > /etc/hostname”
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Executing “hostnamectl set-hostname 4361-RoxburySwerve2021-Robot”
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Executing “sed -i “s/127.0.1.1.4361-RoxburySwerve2021-Robot/127.0.1.1\t4361-RoxburySwerve2021-Robot/g" /etc/hosts"
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Executing “sudo service avahi-daemon restart”
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:17:09] [General - NetworkManager] [INFO] Set hostname to 4361-RoxburySwerve2021-Robot
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Executing “dhclient eth0”
[2021-01-11 08:17:09] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:17:09] [General - NetworkTablesManager] [INFO] Starting NT Server
[2021-01-11 08:17:09] [Camera - VisionSourceManager] [DEBUG] Matching 1 new cameras!
[2021-01-11 08:17:09] [Camera - VisionSourceManager] [INFO] Adding local video device - “Microsoft® LifeCam HD-3000” at “/dev/video0”
[2021-01-11 08:17:09] [Camera - VisionSourceManager] [DEBUG] Trying to match 1 unmatched configs…
[2021-01-11 08:17:09] [Camera - VisionSourceManager] [DEBUG] Trying to find a match for loaded camera Microsoft LifeCam HD-3000 with path /dev/video0
[2021-01-11 08:17:09] [Camera - VisionSourceManager] [DEBUG] Matched the config for Microsoft LifeCam HD-3000 to a physical camera!
[2021-01-11 08:17:09] [Camera - VisionSourceManager] [DEBUG] After matching loaded configs 0 cameras were unmatched.
[2021-01-11 08:17:09] [Camera - VisionSourceManager] [DEBUG] Matched or created 1 camera configs!
[2021-01-11 08:17:10] [Camera - VisionSourceManager] [DEBUG] Matched config for camera “USBFrameProvider - opencv_RoxSwerveCam2021-4361” and loaded 1 pipelines
[2021-01-11 08:17:10] [Camera - VisionSourceManager] [INFO] Adding 1 configs to VMM.
[2021-01-11 08:17:10] [WebServer - DataChangeService] [DEBUG] Added subscriber - Sources: DCS_WEBSOCKET, DCS_HTTP, DCS_NETWORKTABLES, DCS_VISIONMODULE, DCS_OTHER, Destinations: DCD_ACTIVEMODULE, DCD_ACTIVEPIPELINESETTINGS, DCD_GENSETTINGS, DCD_UI, DCD_OTHER
[2021-01-11 08:17:10] [VisionModule - VisionModule - RoxSwerveCam2021-4361] [INFO] Setting pipeline to 0
[2021-01-11 08:17:10] [Camera - USBCameraSource - RoxSwerveCam2021-4361] [DEBUG] Setting camera exposure to 36
[2021-01-11 08:17:10] [WebServer - DataChangeService] [DEBUG] Added subscriber - Sources: DCS_WEBSOCKET, DCS_HTTP, DCS_NETWORKTABLES, DCS_VISIONMODULE, DCS_OTHER, Destinations: DCD_UI
[2021-01-11 08:17:10] [WebServer - DataChangeService] [DEBUG] Added subscriber - Sources: DCS_WEBSOCKET, Destinations: DCD_GENSETTINGS
[2021-01-11 08:17:11] [General - ConfigManager] [DEBUG] Saving to disk…
[2021-01-11 08:17:11] [General - ConfigManager] [INFO] Settings saved!
[2021-01-11 08:17:16] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 51.785664ms
[2021-01-11 08:17:18] [WebServer - SocketHandler] [INFO] New websocket connection from /10.115.209.15:62561
[2021-01-11 08:17:41] [General - MetricsPublisher] [DEBUG] Publishing Metrics…
[2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Executing “sed ‘s/.{3}$/.&/’ <<< cat /sys/class/thermal/thermal_zone0/temp”
[2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Executing "top -bn1 | grep “Cpu(s)” | sed "s/.
, ([0-9.])%* id./\1/" | awk ‘{print 100 - $1}’"
[2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Executing “vcgencmd get_mem arm | grep -Eo ‘[0-9]+’”
[2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Executing “vcgencmd get_mem gpu | grep -Eo ‘[0-9]+’”
[2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Executing “free --mega | awk -v i=2 -v j=3 ‘FNR == i {print j}'" [2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Executing "vcgencmd get_mem malloc | grep -Eo '[0-9]+'" [2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Executing "df ./ --output=pcent | tail -n +2" [2021-01-11 08:17:41] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:17:41] [WebServer - Server] [DEBUG] Handled HTTP POST request from 10.115.209.15 in 448.247ms [2021-01-11 08:18:33] [General - MetricsPublisher] [DEBUG] Publishing Metrics... [2021-01-11 08:18:33] [General - ShellExec] [DEBUG] Executing "sed 's/.\{3\}/.&/’ <<< cat /sys/class/thermal/thermal_zone0/temp”
[2021-01-11 08:18:33] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:18:33] [General - ShellExec] [DEBUG] Executing "top -bn1 | grep “Cpu(s)” | sed "s/.
, ([0-9.])%* id./\1/" | awk ‘{print 100 - $1}’"
[2021-01-11 08:18:33] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:18:33] [General - ShellExec] [DEBUG] Executing “free --mega | awk -v i=2 -v j=3 ‘FNR == i {print j}'" [2021-01-11 08:18:33] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:18:33] [General - ShellExec] [DEBUG] Executing "vcgencmd get_mem malloc | grep -Eo '[0-9]+'" [2021-01-11 08:18:33] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:18:33] [General - ShellExec] [DEBUG] Executing "df ./ --output=pcent | tail -n +2" [2021-01-11 08:18:33] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:18:33] [WebServer - Server] [DEBUG] Handled HTTP POST request from 10.115.209.15 in 287.3309ms [2021-01-11 08:18:37] [WebServer - RequestHandler] [INFO] exporting settings to download... [2021-01-11 08:18:37] [WebServer - RequestHandler] [INFO] Uploading settings with size 26130 [2021-01-11 08:18:37] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 225.41487ms [2021-01-11 08:21:13] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 3.390037ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 7.66426ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 3.961463ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 13.118648ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 15.626555ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 3.563223ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 2.857222ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 3.186111ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 4.400815ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 3.845556ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 3.524074ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 5.168722ms [2021-01-11 08:21:14] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 3.080314ms [2021-01-11 08:21:14] [General - MetricsPublisher] [DEBUG] Publishing Metrics... [2021-01-11 08:21:14] [General - ShellExec] [DEBUG] Executing "sed 's/.\{3\}/.&/’ <<< cat /sys/class/thermal/thermal_zone0/temp”
[2021-01-11 08:21:14] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:21:14] [General - ShellExec] [DEBUG] Executing "top -bn1 | grep “Cpu(s)” | sed "s/.
, ([0-9.])%* id./\1/" | awk ‘{print 100 - $1}’"
[2021-01-11 08:21:15] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:21:15] [General - ShellExec] [DEBUG] Executing “free --mega | awk -v i=2 -v j=3 ‘FNR == i {print j}'" [2021-01-11 08:21:15] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:21:15] [General - ShellExec] [DEBUG] Executing "vcgencmd get_mem malloc | grep -Eo '[0-9]+'" [2021-01-11 08:21:15] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:21:15] [General - ShellExec] [DEBUG] Executing "df ./ --output=pcent | tail -n +2" [2021-01-11 08:21:15] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:21:15] [WebServer - Server] [DEBUG] Handled HTTP POST request from 10.115.209.15 in 320.71603ms [2021-01-11 08:21:25] [WebServer - Server] [DEBUG] Handled HTTP POST request from 10.115.209.15 in 54.768463ms [2021-01-11 08:21:26] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 08:21:26] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 08:22:39] [VisionModule - VisionModule - RoxSwerveCam2021-4361] [INFO] Setting pipeline to -1 [2021-01-11 08:22:39] [Camera - USBCameraSource - RoxSwerveCam2021-4361] [DEBUG] Setting camera exposure to 50 [2021-01-11 08:22:40] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 08:22:40] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 08:22:43] [VisionModule - VisionModule - RoxSwerveCam2021-4361] [INFO] Setting pipeline to 0 [2021-01-11 08:22:43] [Camera - USBCameraSource - RoxSwerveCam2021-4361] [DEBUG] Setting camera exposure to 36 [2021-01-11 08:22:45] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 08:22:45] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 08:25:02] [VisionModule - VisionModule - RoxSwerveCam2021-4361] [INFO] Setting pipeline to -1 [2021-01-11 08:25:02] [Camera - USBCameraSource - RoxSwerveCam2021-4361] [DEBUG] Setting camera exposure to 50 [2021-01-11 08:25:04] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 08:25:04] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 08:25:04] [General - MetricsPublisher] [DEBUG] Publishing Metrics... [2021-01-11 08:25:04] [General - ShellExec] [DEBUG] Executing "sed 's/.\{3\}/.&/’ <<< cat /sys/class/thermal/thermal_zone0/temp”
[2021-01-11 08:25:04] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:25:04] [General - ShellExec] [DEBUG] Executing "top -bn1 | grep “Cpu(s)” | sed "s/.
, ([0-9.])%* id./\1/" | awk ‘{print 100 - $1}’"
[2021-01-11 08:25:04] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:25:04] [General - ShellExec] [DEBUG] Executing “free --mega | awk -v i=2 -v j=3 ‘FNR == i {print j}'" [2021-01-11 08:25:04] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:25:04] [General - ShellExec] [DEBUG] Executing "vcgencmd get_mem malloc | grep -Eo '[0-9]+'" [2021-01-11 08:25:04] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:25:04] [General - ShellExec] [DEBUG] Executing "df ./ --output=pcent | tail -n +2" [2021-01-11 08:25:04] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:25:04] [WebServer - Server] [DEBUG] Handled HTTP POST request from 10.115.209.15 in 247.58807ms [2021-01-11 08:25:07] [WebServer - RequestHandler] [INFO] exporting settings to download... [2021-01-11 08:25:07] [WebServer - RequestHandler] [INFO] Uploading settings with size 26510 [2021-01-11 08:25:07] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 53.226128ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 3.061426ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 4.486723ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 5.154852ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 5.35926ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 4.285815ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 3.469092ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 6.09037ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 5.047352ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 9.392834ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 4.399574ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 3.339815ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 3.253222ms [2021-01-11 08:25:57] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 13.982703ms [2021-01-11 08:28:34] [VisionModule - VisionModuleChangeSubscriber - RoxSwerveCam2021-4361] [DEBUG] Skipping pipeline change, index -1 already active [2021-01-11 08:28:36] [VisionModule - VisionModuleChangeSubscriber - RoxSwerveCam2021-4361] [DEBUG] Skipping pipeline change, index -1 already active [2021-01-11 08:28:38] [VisionModule - VisionModule - RoxSwerveCam2021-4361] [INFO] Setting pipeline to 0 [2021-01-11 08:28:38] [Camera - USBCameraSource - RoxSwerveCam2021-4361] [DEBUG] Setting camera exposure to 36 [2021-01-11 08:28:40] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 08:28:40] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 08:28:41] [VisionModule - VisionModule - RoxSwerveCam2021-4361] [INFO] Setting pipeline to -1 [2021-01-11 08:28:41] [Camera - USBCameraSource - RoxSwerveCam2021-4361] [DEBUG] Setting camera exposure to 50 [2021-01-11 08:28:42] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 08:28:42] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 08:28:45] [General - MetricsPublisher] [DEBUG] Publishing Metrics... [2021-01-11 08:28:45] [General - ShellExec] [DEBUG] Executing "sed 's/.\{3\}/.&/’ <<< cat /sys/class/thermal/thermal_zone0/temp”
[2021-01-11 08:28:45] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:28:45] [General - ShellExec] [DEBUG] Executing "top -bn1 | grep “Cpu(s)” | sed "s/.
, ([0-9.])%* id./\1/" | awk ‘{print 100 - $1}’"
[2021-01-11 08:28:46] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:28:46] [General - ShellExec] [DEBUG] Executing “free --mega | awk -v i=2 -v j=3 ‘FNR == i {print j}'" [2021-01-11 08:28:46] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:28:46] [General - ShellExec] [DEBUG] Executing "vcgencmd get_mem malloc | grep -Eo '[0-9]+'" [2021-01-11 08:28:46] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:28:46] [General - ShellExec] [DEBUG] Executing "df ./ --output=pcent | tail -n +2" [2021-01-11 08:28:46] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:28:46] [WebServer - Server] [DEBUG] Handled HTTP POST request from 10.115.209.15 in 320.97012ms [2021-01-11 08:28:49] [VisionModule - VisionModule - RoxSwerveCam2021-4361] [INFO] Setting pipeline to 0 [2021-01-11 08:28:49] [Camera - USBCameraSource - RoxSwerveCam2021-4361] [DEBUG] Setting camera exposure to 36 [2021-01-11 08:28:51] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 08:28:51] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 08:28:57] [General - MetricsPublisher] [DEBUG] Publishing Metrics... [2021-01-11 08:28:57] [General - ShellExec] [DEBUG] Executing "sed 's/.\{3\}/.&/’ <<< cat /sys/class/thermal/thermal_zone0/temp”
[2021-01-11 08:28:57] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:28:57] [General - ShellExec] [DEBUG] Executing "top -bn1 | grep “Cpu(s)” | sed "s/.
, ([0-9.])%* id./\1/" | awk ‘{print 100 - $1}’"
[2021-01-11 08:28:57] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 08:28:57] [General - ShellExec] [DEBUG] Executing “free --mega | awk -v i=2 -v j=3 ‘FNR == i {print j}'" [2021-01-11 08:28:57] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:28:57] [General - ShellExec] [DEBUG] Executing "vcgencmd get_mem malloc | grep -Eo '[0-9]+'" [2021-01-11 08:28:57] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:28:57] [General - ShellExec] [DEBUG] Executing "df ./ --output=pcent | tail -n +2" [2021-01-11 08:28:57] [General - ShellExec] [DEBUG] Got exit code 0 [2021-01-11 08:28:57] [WebServer - Server] [DEBUG] Handled HTTP POST request from 10.115.209.15 in 298.09793ms [2021-01-11 08:43:05] [WebServer - SocketHandler] [INFO] Closing websocket connection from /10.115.209.15:62561 for reason: Disconnected [2021-01-11 08:43:05] [WebServer - SocketHandler] [INFO] All websocket connections are closed. Setting inputShouldShow to false. [2021-01-11 08:43:07] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 08:43:07] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 08:45:14] [WebServer - SocketHandler] [INFO] New websocket connection from /10.115.209.15:62965 [2021-01-11 08:45:24] [WebServer - SocketHandler] [INFO] Closing websocket connection from /10.115.209.15:62965 for reason: Disconnected [2021-01-11 08:45:24] [WebServer - SocketHandler] [INFO] All websocket connections are closed. Setting inputShouldShow to false. [2021-01-11 08:45:25] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 08:45:25] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 08:52:09] [WebServer - SocketHandler] [INFO] New websocket connection from /10.115.209.15:63023 [2021-01-11 09:00:32] [WebServer - SocketHandler] [INFO] Closing websocket connection from /10.115.209.15:63023 for reason: Disconnected [2021-01-11 09:00:32] [WebServer - SocketHandler] [INFO] All websocket connections are closed. Setting inputShouldShow to false. [2021-01-11 09:00:34] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 09:00:34] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 09:12:02] [WebServer - SocketHandler] [INFO] New websocket connection from /10.115.209.15:63345 [2021-01-11 09:12:25] [WebServer - SocketHandler] [INFO] Closing websocket connection from /10.115.209.15:63345 for reason: Disconnected [2021-01-11 09:12:25] [WebServer - SocketHandler] [INFO] All websocket connections are closed. Setting inputShouldShow to false. [2021-01-11 09:12:26] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 09:12:26] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 09:13:58] [WebServer - SocketHandler] [INFO] New websocket connection from /10.115.232.17:63391 [2021-01-11 09:14:01] [WebServer - SocketHandler] [INFO] New websocket connection from /10.115.209.15:63414 [2021-01-11 09:28:43] [VisionModule - VisionModule - RoxSwerveCam2021-4361] [INFO] Setting pipeline to -1 [2021-01-11 09:28:43] [Camera - USBCameraSource - RoxSwerveCam2021-4361] [DEBUG] Setting camera exposure to 50 [2021-01-11 09:28:44] [General - ConfigManager] [DEBUG] Saving to disk... [2021-01-11 09:28:44] [General - ConfigManager] [INFO] Settings saved! [2021-01-11 09:28:45] [General - MetricsPublisher] [DEBUG] Publishing Metrics... [2021-01-11 09:28:45] [General - ShellExec] [DEBUG] Executing "sed 's/.\{3\}/.&/’ <<< cat /sys/class/thermal/thermal_zone0/temp”
[2021-01-11 09:28:45] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 09:28:45] [General - ShellExec] [DEBUG] Executing "top -bn1 | grep “Cpu(s)” | sed "s/.
, ([0-9.])%* id.*/\1/” | awk ‘{print 100 - $1}’”
[2021-01-11 09:28:45] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 09:28:45] [General - ShellExec] [DEBUG] Executing “free --mega | awk -v i=2 -v j=3 ‘FNR == i {print $j}’”
[2021-01-11 09:28:45] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 09:28:45] [General - ShellExec] [DEBUG] Executing “vcgencmd get_mem malloc | grep -Eo ‘[0-9]+’”
[2021-01-11 09:28:45] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 09:28:45] [General - ShellExec] [DEBUG] Executing “df ./ --output=pcent | tail -n +2”
[2021-01-11 09:28:45] [General - ShellExec] [DEBUG] Got exit code 0
[2021-01-11 09:28:45] [WebServer - Server] [DEBUG] Handled HTTP POST request from 10.115.209.15 in 280.05814ms
[2021-01-11 09:28:46] [WebServer - RequestHandler] [INFO] exporting settings to download…
[2021-01-11 09:28:46] [WebServer - RequestHandler] [INFO] Uploading settings with size 27165
[2021-01-11 09:28:46] [WebServer - Server] [DEBUG] Handled HTTP GET request from 10.115.209.15 in 124.43934ms
[2021-01-11 09:29:23] [WebServer - RequestHandler] [INFO] exporting settings to download…

I see this in my desktop robot simulation program.

image

Here is what I see when running PhotonVision on my Romi. Notice how I have a lot more data there and how the inputSaveImage toggles! It doesn’t seem like you are connected to PhotonVision?

You mention that you are running simulation are you trying to simulate code for your actual robot? If so then how would it take a picture if it isn’t actually connected to the robot? If you are doing this on a Romi then it is likely you aren’t connected to NT do you have team number set to 0?

I have a Raspberry Pi with Photonvision on it and the code that I posted above is in a method that call from the robotInit() method. I’m just trying to test it. It’s not connected to an actual robot. I am very new to FRC programming. Is there anything that I am doing wrong?

Hmmm ok. So this might get into how network tables works in sim… something the wpi folks would probably be better versed in talking about.

My home test setup is a bit non-standard, but might align with what you’re doing? I just have my photonvision pi plugged into my home network (which does not follow the 10.TE.AM.XX subnet pattern). I configured photonvision to be the networkTables server (switch in the settings window), then use the following code to get my sim to connect to a non-default (ie, non-RIO) NT server:

  PhotonCamera cam;
  NetworkTableInstance inst;
  NetworkTable rootTable;

  @Override
  public void robotInit() {
    inst = NetworkTableInstance.create();
    inst.startClient("photonvision.local", 1735);
    rootTable = inst.getTable("/photonvision/mainCamera");
    cam = new PhotonCamera(rootTable);
  }

Here’s the net effect:

To be clear, I’m not entirely sure if this is the most optimal setup, but I know it’s at least mildly functional.