-
Notifications
You must be signed in to change notification settings - Fork 0
Jetson setup
To fully use our robots brain (Jetson Xavier AGX) and other hardware (f.e. ZED camera) we have to spend some time for setup. We want to use the most recent versions of our critical libraries to maximize the functionality and performance. We have to keep our system updated. This might require to flash Jetson and setup everything from scratch, which makes documentation on this issue really important.
Most critical applications for our use are:
- Recent CUDA framework version (+cudnn)
- ZED SDK
- Support for recent version of ML frameworks (PyTorch, TensorFlow, TensorRT).
Basically, our application depends of CUDA version, which itself gets updated for Jetson with new JetPack releases. JetPack contains all essential software for Jetson and it can be easily installed after successful flashing.
To flash Jetson with Jetson Linux (L4T) and Jetson SDK components you basically need:
- USB - USB-C cable (comes with Jetson)
- Power connected to Jetson
- Computer with Ubuntu 18/20/22 or Windows 11 or docker...
- About ~20GB of diskspace on host PC.
This tutorial was prepared at the time of JetPack 5.0.2 with SDK Manager 1.9.1, on Ubuntu 20.04, for Jetson Xavier AGX.
All flashing work is done with SDK Manager. You have to follow the steps. They change with each update of this tool, so no detailed instruction is provided here.
IMPORTANT: Most likely you don't want to install on-host packages, so feel free to un-check Host Machine at step 1 configuration. Even tho you don't install anything on Host, it's important to get your sudo apt update
output clean with no errors at all. By the time I was doing the flash, I had to go with manual installation instead of automatic. CAREFULLY read all the instructions on your screen and you will succeed. After flashing, JetPack components installation will be done. Then you are ready to go with the rest of the setup.
Now when we have Jetson running with all basic drivers and libraries, we want to get SDK for ZED Camera and setup environment to use with our application (YOLO detector in PyTorch/TensorRT, NumPy and, some libraries for UART communication etc.).
ZED has dedicated installer for Jetson. You can storm to ZED SDK download page and install the version suiting your JetPack. Just make sure you get the right version. As CUDA and cuDNN are already setup, you don't have to worry about them. Make sure you install python bindings during ZED installation. This installation is quite simple.
You might want to install tools such as Jetson Stats. This suite allows to control the board CPU, GPU, MEM, Power profile, Fan etc. in very convenient way.
You might want to setup VS Code with our styling. You can also use Jetson through SSH with remote ssh extension from your Host PC, but you might want to get GUI experiance with all displays from Camera etc, so it's easier to have good developer tools setup on Jetson whenever you need to adjust some code.
Currently we are looking into some tools for Jetson to get all stuff we need to run YOLO detector in TensorRT/PyTorch and our application (using OpenCV, NumPy etc...) with easy environment. Conda is a first guess, but it's highly possible that not all packages are released in conda repositories for ARM architecture. We have such a conda environment for x86 here. At some point we might decide to adapt some docker image, which might require much of additional configuration with ZED etc. but can provide reliable and easy setup for our "production".