FPV Camera Server
The opencv.py binary (located in src-tauri) creates a Flask server which streams first-person-view camera feeds from the vehicles via OpenCV.
In the future, we may opt for a different solution for streaming camera feeds to the GCS.
Compiling
Section titled “Compiling”You’ll need Python/pip.
-
Install dependencies.
pip install flaskpip install opencv-pythonpip pyinstaller -
Use pyinstaller to compile the
opencv.pyfile into a sidecar.pyinstaller --onefile .\src-tauri\opencv.py --distpath .\src-tauri\binaries\ -
Ensure the opencv sidecar is in the
distfolder. Move the sidecar intobinariesfolder (if there is already a file, replace it). -
Run the Node.js script to rename the sidecar file, as you must add your architecture to the file name.
bun run target:tripleRefer to the next section for more details on what this script is.
Now the FPV camera server should run with bun tauri dev. It takes time for it to spin up and once it does, make sure you refresh the camera window.