Jetson TK1 Installation

jaredjstein edited this page Aug 1, 2016 · 87 revisions

OpenPTrack Jetson TK1 Installation Guide

OpenPTrack is currently being ported and tested to work on the Jetson TK1. As the TK1 has an ARM processor, the installation process and libraries deviate from the Master branch installation process.

This installation guide is still under development, and this process may change in the future.

N.B.: Intrinsic calibration cannot be completed on the TK1. This process needs to be completed on a different machine, and then the intrinsic calibration files need to be moved to the TK1.

N.B.2: The TK1 and the TX1 cannot be used to run the master processes.

N.B.3: Only the Kinect v2 can be used with the TK1; the Kinect v1 WILL NOT WORK.

Flashing the TK1

N.B.: This process needs to be completed on a secondary Ubuntu machine.

Before starting the OpenPTrack TK1 installation process, your device needs to be flashed per the following specifications:

1. Download the nVidia [Jetpack] (

2. In the Terminal, navigate to the folder where the JetPackTK1 1.1 package was downloaded, and then run:

chmod +x JetPack*

3. When the installation process starts, select custom:

4. During the custom installation process, uncheck all of the packages to be installed, except:

Jetson TK1 Development Pack
Linux for Tegra R2 1.3
Post Setup
Flash Device

Your custom installation screen should now look like this:

5. Now follow the installation screen until you are prompted to put your device in Recovery Mode:

To put your TK1 in recover mode, follow these steps:

⦁ Power off the TK1 (if it is powered on);

⦁ Connect the TK1 with a Micro USB cable to the computer to which you downloaded the JetPack;

⦁ Power on the TK1 (connect the AC adapter, then press the POWER button if the fan does not start automatically);

⦁ Press and hold the FORCE RECOVERY BUTTON. While pressing it, press and release the RESET button; after two seconds, release the FORCE RECOVERY BUTTON.

N.B.: To verify your TK1 is indeed in recovery mode, in the Terminal window, run:


If there is an entry for an nVidia device, your TK1 is in Recovery Mode.

6. Follow the installation prompts as needed.

##Installing OpenPTrack on Flashed TK1

1. After flashing your TK1, SSH into it by:

ssh -X ubuntu@tegra-ubuntu.local

The default username and password will be:


2. Enable full USB 3.0 Performance:

Edit /boot/extlinux/extlinux.conf by changing the following entry:


to the following:


Additionally, add the following line to the end of the document:


3. Now the udev rules for the Kinect v2 needs to be added. To do this, create /etc/udev/rules.d/90-kinect2.rules with the following text:

# ATTR{product}=="Kinect2"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02c4", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02d8", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02d9", MODE="0666"

4. Now install utilities and permits for Ubuntu Universe and Multiverse:

sudo apt-add-repository universe
sudo apt-add-repository multiverse
sudo apt-get update
sudo apt-get install -y bash-completion command-not-found locate git gitg vim

5. Install and configure ROS base system and Point Cloud Library:

sudo sh -c 'echo "deb $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp:// --recv-key 0xB01FA116
sudo apt-get update
sudo apt-get install -y ros-indigo-desktop
sudo apt-get install -y python-rosinstall
sudo add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install -y libpcl-1.7-all
sudo apt-get install -y ros-indigo-compressed-depth-image-transport ros-indigo-compressed-image-transport ros-indigo-pcl-ros ros-indigo-camera-info-manager ros-indigo-driver-base ros-indigo-calibration
sudo rosdep init
rosdep update
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
source ~/.bashrc
mkdir -p ~/workspace/ros/catkin/src
cd ~/workspace/ros/catkin
catkin_make --force-cmake
echo "export KINECT_DRIVER=openni" >> ~/.bashrc
echo "export LC_ALL=C" >> ~/.bashrc
echo "source /home/ubuntu/workspace/ros/catkin/devel/setup.bash" >> ~/.bashrc

6. Install and configure NTP per the [ installation guide] (

7. Install CUDA:

sudo dpkg -i cuda-repo-l4t-r21.2-6-5-prod_6.5-34_armhf.deb
sudo apt-get update
sudo apt-get install -y cuda-toolkit-6-5
sudo usermod -a -G video $USER
echo "# Add CUDA bin & library paths:" >> ~/.bashrc
echo "export PATH=/usr/local/cuda/bin:$PATH" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
source ~/.bashrc

8. Install Libfreenect2 and Max Performance Scripts:

First, reboot your TK1:

sudo reboot

After reboot, SSH back into the device:

ssh -X ubuntu@tegra-ubuntu.local

Install the required scripts:

sudo apt-get install -y build-essential libturbojpeg libtool autoconf libudev-dev cmake mesa-common-dev freeglut3-dev libxrandr-dev doxygen libxi-dev libjpeg-turbo8-dev
git clone
cd libfreenect2
git checkout jetson-dev
cd depends
sudo ln -s /usr/lib/arm-linux-gnueabihf/ /usr/lib/arm-linux-gnueabihf/
cd ..
cd jetson_scripts
chmod +x *
sudo cp * /usr/bin

9. Verify Protonect Installation:


sudo MaxPerformance &> /dev/null

Any print out on the terminal is fine as long as it is not an error. Now run:

sudo Status

If everything has been installed correctly, the Terminal print out should look like:

CPUs active (it should be 0-3):
CPUs freq (it should be 2032500000):
CPU governor (it should be userspace):
GPU clock (it should be 852000000):
GPU memory clock (it should be 924000000):

If the print out from sudo Status does not look like this, reboot your TK1 and run the command again. If the print out is still not correct, verify that all of the installation steps have been followed.

10. Plug your Kinect v2 into a power source BEFORE plugging in the Kinect v2 to the USB 3.0 port. After the Kinect v2 is powered, proceed to connect it to the TK1 USB 3.0 port. Now run:

cd ../examples/protonect/
mkdir build && cd build
cmake ..
make -j4

If all libraries and directions were followed properly, you will now see (with some delay, as the visualization is being delivered over SSH) three windows with the depth image, RGB image, and IR image. If you do not receive any images, and your terminal is only printing the following:

 [DepthPacketStreamParser::handleNewData] subpacket incomplete (needed X received Y)]

Then verify that your TK1 was set to max performance mode correctly and that your Kinect v2 is connected to the TK1 properly. If you are receiving USB errors, there is a possibility your Protonect library was linked to the incorrect version of libusb. To fix this, first try rebooting your TK1 and running the commands (above) again; then, connect to the correct library.

Once you are seeing the three images, kill the Protonect process and run:

sudo make install

11. Install IAI_KINECT2:

cd /home/ubuntu/workspace/ros/catkin/src
git clone
cd iai_kinect2
git checkout jetson-dev

If you see an internal compiler error, run:


You can verify the installation by running:

sudo MaxPerformance &> /dev/null
roslaunch kinect2_bridge kinect2_bridge_ir.launch

The Terminal print out should look similar to:

[CudaDepthPacketProcessor] avg. time: 21.5727ms -> ~46.3548Hz
[TegraJpegRgbPacketProcessor] avg. time: 17.6418ms -> ~56.6837Hz

Once this command is running, and the information verified, the process can be killed.

You can check the point cloud frequency by running:

rostopic hz /kinect2_head/depth_ir/points

(The command roslaunch kinect2_bridge kinect2_bridge_ir.launch must be running!)

You should see the Hz around 20-21 FPS.

12. Install OpenPTrack:

cd /home/ubuntu/workspace/ros/catkin/src
git clone
cd open_ptrack
git checkout jetson-dev
cd scripts
chmod +x *
cd /home/ubuntu/workspace/ros/catkin/
catkin_make --pkg calibration_msgs
catkin_make --pkg opt_msgs

After OpenPTrack has been installed, follow the same procedures for configuration that are outlined in the Wiki. The next step in the process will be [Pre-Calibration Configuration] (

N.B.: We suggest, if you are installing OpenPTrack on more than one TK1, that you clone your completed Ubuntu OpenPTrack installation, then flash the remaining TK1s with the Operating System clone. To do this, after you verify the completed TK1 OpenPTrack installation, clone your successful Ubuntu OS, and then install the clone on the remaining TK1s that will be used in your OpenPTrack network. The cloning directions can be found here.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.