File Reader Example
In this example you will learn how to upload a given log file and use it to run the file_reader example.
If you haven't already cloned the
farm-ng-amiga repository, do
If you already have the log file you want to run with this example you can skip to set up
Download the log file
Now you are going to download the log file that you will use in this example. Click here to download
[Optional] Make a Data folder
We are going to make a folder that will store all of our log files, including the one you just downloaded.
pwd # the output of this is your <path>
# Now that the file is downloaded you will do the following
cd ~ # navigate to home directory
mv events_12052022115852.bin <path-to-where-data-file-is-above> # moving the data to to data-folder
Now that you have your log file in the correct place, in your
terminal navigate to where the repository
farm-ng-amiga is and
open Visual Studio Code.
Create first a virtual environment
python3 -m venv venv
pip install -r requirements.txt
Specify the file (download before)
python main.py --file-name <path-from-above>/events_12052022115852.bin
Optionally, you can change the camera that is played back from
the default of
python main.py --file-name <path-from-above>/events_12052022115852.bin --camera-name oak1
Congratulations two videos should now pop up and play! One should be RGB and one should be disparity (it might be hidden behind the RGB window so try moving the RGB window). You have now finished running this example!
If you want another log file to run here is an example of Amiga driving in a field (click to download)
There is another tutorial that walks you through getting data directly from the Amiga here.