Jetson TX2

Getting a Jetson

Camelot started out as a hack-a-thon project running off of a Raspberry Pi 3B. I had an SD card with Raspbian, ROS Melodic, and OpenCV so it was easy to prototype. We connected a 5 inch touch screen and a wireless keyboard. After the hack-a-thon I even programmed it to follow and AprilTag. However using a Raspberry Pi is not going to be a good solution for further down the road. Especially since I want to connect my ZED stereo camera to Camelot. It requires a lot of computational power to run Visual SLAM so I knew I needed a better board. I debating between getting an Intel NUC or an Nvidia Jetson TX2. The NUC would be cool because it is x86 based and in my experience it is much easier to get software working on such platforms. For example I had to compile OpenCV and ROS for over 12 hours on my raspberry pi to get the image we used during the hack-a-thon. However, the Jetson is more powerful for the price. There are also a bunch of existing robotics projects built around the Jetson TX2. I decided this was the way to go so I ordered one. 

(Looking back I should have bought the Jetson that was being sold with the ZED camera I bought from swapfest, but that was more money than I was willing to spend that day.)

I was so excited when it finally arrived! However, it was a bit intimidating to setup. I had worked with a Jetson TX2 before in one of my classes and I heard that these were a bit tricky to get working how you want them to.

Setup

The first step for setting up the Jetson was to install the JetPack software. I didn't have a copy of Ubuntu 18.04 on my desktop so I installed that first. Then I downloaded the JetPack installation software from the Nvidia website. I plugged in all of the correct cables and followed the instructions to flash the OS to the board.

After I installed Ubuntu it was running super slow and the mouse was lagging a bunch. Also all cores of the CPU were always above 20%. I thought that this might be because I installed it on a hard drive instead of an SSD but I didn't think that should make the OS almost unusable. I didn't realized this until after but this meant that my graphics drivers were not up-to-date/installed. Just a reminder for myself in the future: this is how to install graphics drivers for Nvidia cards on Ubuntu.

sudo add-apt-repository ppa:graphics-drivers/ppa

sudo apt-get update

sudo ubuntu-drivers autoinstall

sudo reboot

I found it difficult to find out what exactly I needed to do. However, after I found this page on the ZED SDK site, I figured it out.

Installing ROS

Now that there is an operating system on the board I need to install the Robot Operating System (ROS). I think I am going to go with ROS 2 for this project. I have used ROS 1 a bunch but I have only messed around with ROS 2 once. Right now it has far fewer packages available but I think I should be able to make it work. It is important to stay up to date with the software. There is a ROS 2 wrapper for the ZED camera I will be using so I think I should be good. It requires ROS2 Crystal Clemmys. So that is what I will attempt to install.


To install ROS2 Crystal I am following these instructions. I downloaded the amd64 version from December 12, 2019. After the installation process finished I added the following line to my ~/.bashrc file to source ROS in every new terminal.

source ~/ros2_crystal/ros2-linux/setup.bash