Note: The current SDK version when I started this post is 1.3.0.
Currently, the only supported Linux distribution for is Ubuntu 18.04 and due to reasons like some existing projects are built on Ubuntu 16.04 etc., it would be nice to have support on these older projects. This post documented what I did to make it work on Ubuntu 16.04 and hopefully can help you as well.
Installation steps
1. Download the SDK from repo:
git clone --recursive https://github.com/microsoft/Azure-Kinect-Sensor-SDK.git cd Azure-Kinect-Sensor-SDK git checkout release/1.3.x
2. Download and install its dependencies
sudo dpkg --add-architecture amd64 sudo apt update sudo apt install -y \ pkg-config \ ninja-build \ doxygen \ clang \ gcc-multilib \ g++-multilib \ python3 \ nasm sudo apt install -y \ libgl1-mesa-dev \ libsoundio-dev \ libvulkan-dev \ libx11-dev \ libxcursor-dev \ libxinerama-dev \ libxrandr-dev \ libusb-1.0-0-dev \ libssl-dev \ libudev-dev \ mesa-common-dev \ uuid-dev
3. Build the SDK!
mkdir build && cd build cmake .. -GNinja ninja
4. Download the depth engine file libdepthengine.so.2.0:
you can download from here:
https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/libk/libk4a1.2/libk4a1.2_1.2.0_amd64.deb
Right click the deb file to open with Archive Manager, go into data.tar.gz find the
libdepthengine.so.2.0 file in /./usr/lib/x86_64-linux-gnu/ Drag the file to /Azure-Kinect-Sensor-SDK/build/bin
if you can not find the file, I have it here.
5. Last step: Device Setup
In order to use the Azure Kinect SDK with the device and without being ‘root’, you will need to setup udev rules. We have these rules checked into this repo under ‘scripts/99-k4a.rules’. To do so:
sudo cp ../scripts/99-k4a.rules /etc/udev/rules.d/
Detach and reattach Azure Kinect devices if attached during this process.
Once complete, the Azure Kinect camera is available without being ‘root’.
6. Launch k4aviewer:
./bin/k4aviewer
Now you should be able to get the color, IR and depth stream from your Azure Kinect!
Troubleshooting:
If you encounter error related to libstdc++.so.6, fix it by doing the following:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.9 sudo apt-get upgrade libstdc++6
If you encounter error related to Cmake, fix it by installing the latest version:
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/ ./bootstrap make -j4 sudo make install
Experiment with Open3D
Open3D is an open source library for 3D point cloud processing. It has already provided support for Azure Kinect, you can take look at here on how to use it in Open3D. So basically just two lines after you follow the installation steps above:
pip install open3d pip install open3d_azure_kinect_ubuntu1604_fix
Now you should be able to use Open3D to do whatever you want with point cloud.
If this post helped you, please consider supporting me.
