Skip to content

Instantly share code, notes, and snippets.

@jlblancoc
Last active August 11, 2023 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlblancoc/ae2a082b0ed5af2e71645b04b7207210 to your computer and use it in GitHub Desktop.
Save jlblancoc/ae2a082b0ed5af2e71645b04b7207210 to your computer and use it in GitHub Desktop.
Install Azure Kinect DK on Ubuntu 22.04 or newer

Install lib4adev driver library

The Microsoft Kinect for Azure (k4a) is only supported officially for Ubuntu 18.04.

Here are instructions to install its library in a more recent OS:

# Install the key
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

# Add the repo:
sudo apt-add-repository -y https://packages.microsoft.com/ubuntu/18.04/prod

# Manually change the name of the Ubuntu distro from jammy (or whatever) to "bionic"
sudo vim /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_ubuntu_18_04_prod-jammy.list 

# update once again:
sudo apt update

# Block packages that will cause troubles if updated from their repo:
sudo apt-mark hold unixodbc-dev
sudo apt-mark hold libodbc1

# Install the library:
sudo apt install libk4a1.4-dev

Create the rules.d file to allow opening the camera without "root" permissions:

Use from ROS2

Build the "humble" branch from https://github.com/microsoft/Azure_Kinect_ROS_Driver/tree/humble

Launch the ROS2 node with a launch file, or directly as:

./install/azure_kinect_ros_driver/bin/node \
  --ros-args \
  -p fps:=30 \
  -p color_enabled:=true \
  -p rgb_point_cloud:=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment