The JetBot - 1

Merry Christmas everyone. It is another Christmas, Year 2022 is coming. I'm back to life. Last week, my JetBot arrived. It took me a couple of hours to make it work, and round 1 week to demonstrate: some of the JetBot Examples are NOT working properly. Anyway, my son Fionn is half-year old. Let's celebrate it with JetBot, as well as the heavy Christmas snows.

Christmas Snow My Son Snow
Sunny Snow Lazy Boy Ski In the Snow
Somebody Is In The Snow Beautiful Boy Sunny Sunny Sunny
That's THE Christmas Tree Chubby Boy What a House

I believe we can flash JetPack first and have JetBot configured afterwards. Let's leave this topic for the next blog The JeBot - 2. In this blog, we're going to follow the official JetBot Software Setup.

1. Setup JetBot Hardware

Just refer to this youtube video:

Since what I purchased is a Waveshare JetBot 2GB AI Kit. therefore, my assembled JetBot looks like following:

My Assembled JetBot

As you can see, there is NO antenna. Instead, a Wifi USB dongle is provided. Actully, there are a couple things to be emphasized for my Waveshare JetBot 2GB AI Kit: - No antenna, ONLY a Wifi USB dongle - A 64G TF Card is adopted. A comprehensive overview of SD card is summarized at SD Standard Overview.

2. Setup JetBot Software Using SD Card

2.1 SD Card Image from JetBot Official Website

We just download the JetBot official SD card image from Software Setup (SD Card Image), and flash it to my 64G TF Card.

1
2
3
4
5
➜  jetbot sudo dd bs=1M if=jetbot-043_nano-2gb-jp45.img of=/dev/mmcblk0 conv=fsync 
[sudo] password for lvision:
24679+1 records in
24679+1 records out
25877824000 bytes (26 GB, 24 GiB) copied, 1002.99 s, 25.8 MB/s

After that, as usual, we upgrade the entire JetBot system by sudo apt update and sudo apt upgrade. After all these, our JetBot looks like:

JetBot Linux Kernel

2.2 Change from using Python 2 to Python 3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
➜  ~ python --version
Python 3.6.9
➜ ~ pip --version
whereis WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
pip 21.3.1 from /home/jetbot/.local/lib/python3.6/site-packages/pip (python 3.6)
➜ ~ whereis pip
pip: /usr/bin/pip /home/jetbot/.local/bin/pip3.6 /home/jetbot/.local/bin/pip
➜ ~ ll /usr/bin/pip
lrwxrwxrwx 1 root root 27 Dec 22 12:46 /usr/bin/pip -> /home/jetbot/.local/bin/pip
➜ ~ python -m pip --version
pip 21.3.1 from /home/jetbot/.local/lib/python3.6/site-packages/pip (python 3.6)
➜ ~

2.3 Jetson Stats

After twickling around how to run pip under /home/jetbot/.local/bin for user root, and have Jetson Stats installed using this command sudo -H pip install -U jetson-stats, we got the following results:

Jtop Jetson_config Jetson_release

2.4 Other Third Party Libraries

Anyway, let's take a look at my installed results:

OpenCV and Protobuf

Python JetBot

2.5 Key Points

Do NOT forget to export a couple of environmental variables in both .bashrc and /etc/environment as:

1
2
3
export OPENBLAS_CORETYPE="AARCH64"
export LD_PRELOAD="/home/jetbot/.local/lib/python3.6/site-packages/torch/lib/libgomp-d22c30c5.so.1"
export LD_PRELOAD="/usr/lib/aarch64-linux-gnu/libgomp.so.1.0.0"

It looks that by directly installing pytorch via pip install torch -U --user, a second libgomp will be installed. Both libgomps brought me the error of cannot allocate memory in static TLS block, please refer to:

The solution to the above errors is: * Install PyTorch on Jetson Nano

3. Test JetBot

Pretty much similar to:

JetBot Basic Motion Demo is really a very cool demo for you to start with JetBot. It wouldn't be hard for you to run a Jupyter Notebook Server remotely. Anyway, my testing results are given as follows: a headache video, as well as .pdf summary.

😰

4. Longer Vision JetBot OS

1
2
3
4
5
➜  sudo dd bs=1M if=/dev/mmcblk0 of=jetbot.img conv=fsync
[sudo] password for lvision:
60350+0 records in
60350+0 records out
63281561600 bytes (63 GB, 59 GiB) copied, 726.538 s, 87.1 MB/s
Finally, I attached my built JetBot OS at https://www.longervision.us/iso/jetbot-nano2g-ubuntu18.04.6-cuda10.02-cudnn8.0.0-opencv4.5.4.img. You are welcome to take a try.
😄