How to install the Azure Kinect SDK on Ubuntu 16.04
Update: see this Google Doc for the most up-to-date instructions on setting up Azure Kinect ROS drivers on Ubuntu 16.04. Many thanks to Sarthak Shetty, Kevin Zhang, and Jamie Chen for updating the instructions!
Microsoft recently released the Azure Kinect DK sensor, a $399 developer-oriented sensor kit for robotics and mixed reality applications. The kit’s SDK officially supports Windows and Linux 18.04. I’ve managed to get the v1.1 SDK working on Ubuntu 16.04, and have documented the steps below.
Why downgrade to Ubuntu 16.04?
Many of the robots I work with or have worked with are tied to Ubuntu 16.04, e.g. the Rethink Robotics Sawyer robot, as well as the PR2. Upgrading the robot hardware to 18.04 is difficult and would break existing projects. Although upgrading to 18.04 will eventually be necessary, it is helpful to have the Azure Kinect DK working on 16.04 in the meantime.
Installation steps
These steps worked for me on an existing Ubuntu 16.04 installation, not a fresh one, so your mileage may vary.
- Download the v1.1 SDK from Github.1
$ git clone https://github.com/microsoft/Azure-Kinect-Sensor-SDK/tree/release/1.1.x
- Install dependencies using the provided script.
$ bash ./Azure-Kinect-Sensor-SDK/scripts/bootstrap-ubuntu.sh
- Follow the build steps in https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/release/1.1.x/docs/building.md.
- If you get a CMake error, you may need to upgrade CMake2.
% Download and extract cmake 3.14.5 $ mkdir ~/temp $ cd ~/temp $ wget https://cmake.org/files/v3.14/cmake-3.14.5.tar.gz $ tar -xzvf cmake-3.14.5.tar.gz $ cd cmake-3.14.5/
% Install extracted source $ ./bootstrap $ make -j4 $ sudo make install $ cmake --version
- If you get a libsoundio error, you may need to install jack-tools.
$ sudo apt-get install jack-tools
- If you get a CMake error, you may need to upgrade CMake2.
-
Get a copy of the depthengine binary
libdepthengine.so.1.0
and missing dependencieslibdepthengine.so.1.0
is closed-source code for processing the raw depth stream from the camera. This binary is included as part of k4a-tools, the Azure Kinect SDK Debian package for Ubuntu 18.04.As a result, you’ll need to install k4a-tools on an Ubuntu 18.04 OS following these instructions, then copy the files installed into
/usr/local/lib/x86_64-linux-gnu
onto your Ubuntu 16.04 OS.3In practice, I found that I only needed
libdepthengine.so.1.0
andlibstdc++.so.6
from thex86_64-linux-gnu
folder. - Copy the depthengine binary and missing dependencies into the
bin/
folder generated by the build in step 3.$ cp path/to/x86_64-linux-gnu/libdepthengine.so.1.0 path/to/Azure-Kinect-Sensor-SDK/build/bin/libdepthengine.so.1.0 $ cp path/to/x86_64-linux-gnu/libstdc++.so.6 path/to/Azure-Kinect-Sensor-SDK/build/bin/libstdc++.so.6
- Test the installation by running the SDK viewer.4
$ sudo path/to/Azure-Kinect-Sensor-SDK/build/bin/k4aviewer
If all went well you be able to open your device and see all data streams coming in as below.
To integrate the sensor with ROS, take a look at my follow-up post: How to install ROS drivers for Azure Kinect on Ubuntu 16.04
Footnotes