The Irrigator - an AI-powered irrigation robot.
The Irrigator - https://youtu.be/p2FFj9mP8a0
The Making Of - https://youtu.be/KjNYCxCwHMo
For more details about the hardware, please read my project on Hackster.io (https://www.hackster.io/dumiloghin/the-irrigator-80f1d5).
I downloaded bazel binary (bazel-0.19.2-linux-x86_64) from (https://github.com/bazelbuild/bazel/releases/tag/0.19.2)[https://github.com/bazelbuild/bazel/releases/tag/0.19.2] into isaac_sdk
folder.
Download Isaac SDK and unzip it into a folder called isaac_sdk
.
Copy the content of src/jetson/isaac
into a folder called irrigator
under packages
:
cd isaac_sdk
mkdir -p packages/irrigator
cp ~/git/irrigator/src/jetson/isaac/* packages/irrigator/
cd packages/irrigator/
bazel build irrigator
Bazel run will not work on the development host.
Push the package to Jetson Nano:
./engine/build/deploy.sh --remote_user <user> -p //packages/irrigator:irrigator -h <jetson IP> -d jetpack43
Setup an SD card and power on the Nano, as described here: https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit.
Jetson Nano does not come with a WiFi adapter (this is a big issue, in my opinion). One option is to install an Intel WiFi + Bluetooth adapter, as described by JetsonHacks (https://www.jetsonhacks.com/2019/04/08/jetson-nano-intel-wifi-and-bluetooth/). However, I just purchased a TP-link AC1300 Archer T4U WiFi USB adapter. My adapter uses a Realtek RTL8812BU and not RTL8812AU. Here is how I installed the correct driver:
sudo apt install dkms
git clone https://github.com/cilynx/rtl88x2bu.git
cd rtl88x2bu
VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)
sudo rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}
sudo dkms add -m rtl88x2bu -v ${VER}
sudo dkms build -m rtl88x2bu -v ${VER}
sudo dkms install -m rtl88x2bu -v ${VER}
sudo modprobe 88x2bu
To make sure rtl8812au is not loaded, add this line to /etc/modprobe.d/blacklist.conf
:
blacklist 8812au
To make sure rtl88x2bu is loaded, add a file called rtl88x2bu.conf
in /etc/modprobe.d/blacklist.conf
, with the following content:
/sbin/modprobe 88x2bu
Make sure you have the following models in the models
subfolder:
- mobilenet_v1_1.0_224_quant_and_labels
- coco_ssd_mobilenet_v1_1.0_quant_2018_06_29
- inception_resnet_v2_2018_04_27
Make sure you have Python 3.6 and pip3. My install.sh
script will help you install them.
It also installs tflite for Python 3.6 on ARM 64-bit. For more details, see https://www.tensorflow.org/lite/guide/python.
In addition to tflite, you need to install pillow
.
In the end, the following command captures good-enough photos,
timeout 4 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=2 ! 'video/x-raw,width=960, height=616, format=I420' ! nvjpegenc ! filesink location=$FILE -e
where $FILE is the output file name. Note the use of timeout
command, otherwise, the pipeline does not end.
Some of the code is licensed under:
- Apache License, Version 2.0 - (label_image.py and other scripts in src/jetson/driver)
- GNU General Public License, version 2 (spi code in src/jetson/driver and src/jetson/isaac)