本文主要记录Ubuntu20.04 安装Azure Kinect Sensor SDK
Azure Kinect 人体跟踪 SDK官网:
https://learn.microsoft.com/zh-cn/azure/Kinect-dk/body-sdk-download
Linux版本目前只支持18.04和20.04
Azure Kinect 传感器 SDK 官网:
https://learn.microsoft.com/zh-cn/azure/Kinect-dk/sensor-sdk-download
Linux版本目前只支持18.04,但也能在其他版本上安装!!
GitHub地址:Azure-Kinect-Sensor-SDK
安装地址:https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/develop/docs/usage.md
Windows:
Linux:
libk4a1.4/libk4a1.4-dev:https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/libk/
k4a-tools:https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/k/k4a-tools/
下载完如下:
sudo dpkg -i libk4a1.4_1.4.1_amd64.deb
sudo dpkg -i libk4a1.4-dev_1.4.1_amd64.deb
sudo dpkg -i k4a-tools_1.4.1_amd64.deb
修改root权限:(否则插上相机后读取不到设备)
sudo vim /etc/udev/rules.d/99-k4a.rules
在99-k4a.rules里面添加如下:
# Bus 002 Device 116: ID 045e:097a Microsoft Corp. - Generic Superspeed USB Hub
# Bus 001 Device 015: ID 045e:097b Microsoft Corp. - Generic USB Hub
# Bus 002 Device 118: ID 045e:097c Microsoft Corp. - Azure Kinect Depth Camera
# Bus 002 Device 117: ID 045e:097d Microsoft Corp. - Azure Kinect 4K Camera
# Bus 001 Device 016: ID 045e:097e Microsoft Corp. - Azure Kinect Microphone Array
BUS!="usb", ACTION!="add", SUBSYSTEM!=="usb_device", GOTO="k4a_logic_rules_end"
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097a", MODE="0666", GROUP="plugdev"
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097b", MODE="0666", GROUP="plugdev"
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097c", MODE="0666", GROUP="plugdev"
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097d", MODE="0666", GROUP="plugdev"
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097e", MODE="0666", GROUP="plugdev"
LABEL="k4a_logic_rules_end"
内容来源于:
https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/develop/scripts/99-k4a.rules
打开相机测试下:
k4aviewer
(可以用一条雷电线对相机进行供电和传数据或者一条电源线+一个数据线USB3.0)
安装相机ROS驱动
地址:https://github.com/microsoft/Azure_Kinect_ROS_Driver
git clone https://github.com/microsoft/Azure_Kinect_ROS_Driver.git
创建工作空间,编译源码
mkdir slam_ws
cd slam_ws
mkdir src
# 将相机驱动放入src
catkin_make
source devel/setup.bash
roslaunch azure_kinect_ros_driver driver.launch
rviz
修改depth_mode、fps!