Installation steps for Donkeycar on Jetson Nano/Xavier

Based on Jetpack 4.4 L4T 32.4.2

Thanks to Purnomo for edits

Get Jetpack 4.4 from here

https://developer.nvidia.com/embedded/jetpack

note: the sd card image for jetson xavier nx and jetson nano are different

Installation steps for Donkeycar on Jetson Nano/Xavier

sudo apt-get update -y 
sudo apt-get upgrade -y 
sudo reboot now

Install and upgrade pip3

sudo apt-get install -y libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
sudo apt-get install -y python3-dev python3-pip
sudo apt-get install -y libxslt-dev libxml2-dev libffi-dev libcurl4-openssl-dev libssl-dev libpng-dev libfreetype6-dev
sudo apt install nano

Install Virtual Env

python3 -m virtualenv -p python3 env --system-site-packages
echo “source env/bin/activate” >> ~/.bashrc
source ~/.bashrc

Install Tensorflow(1.15.2), etc

pip3 install -U pip testresources setuptools
pip3 install -U futures protobuf pybind11
pip3 install -U cython
pip3 install -U --no-use-pep517 numpy
pip3 install -U future==0.17.1 mock==3.0.5 h5py==2.9.0 keras_preprocessing==1.0.5 keras_applications==1.0.8 gast==0.2.2
pip3 install -U grpcio absl-py py-cpuinfo psutil portpicker six requests astor termcolor protobuf wrapt google-pasta
pip3 install -U --no-use-pep517 scipy==1.4.1
pip3 install -U --no-use-pep517 pandas
pip3 install -U --no-use-pep517 matplotlib
pip3 install --no-cache-dir --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v44 'tensorflow<2'

Install DonkeyCar

mkdir -p ~/projects; cd ~/projects
git clone https://github.com/autorope/donkeycar
cd donkeycar
git checkout master
pip3 install -e .[nano]
donkey createcar --path ~/mycar

Optional but useful Tools for Donkeycar

Make sure your I2C connections are working

For jetson xavier NX:

i2cdetect -r -y 8

For jetson nano

i2cdetect -r -y 1

If the I2C is working correctly, you should see something like this (showing devices found at address 40 and 70)

Install jtop

Tool similar to system monitor but also display gpu activity, temp, fan,etc

sudo -H pip3 install -U jetson-stats

to run: jtop

Install SwapFile

Increase memory by using disk

git clone https://github.com/JetsonHacksNano/installSwapfile
cd installSwapfile
sudo swapoff -a

Make modification of swapfile size by using installSwapfile.sh

sudo nano ~/installSwapfile/installSwapfile.sh
./installSwapfile.sh

Install test CSIC camera:

git clone https://github.com/JetsonHacksNano/CSI-Camera.git

Test a Camera:

gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink

SSH to local jetson nano:

sudo apt-get install screen