Ubuntu20.04和22.04配置Azure Kinect Sensor SDK

Azure Kinect Body Tracking SDK官方支持Ubuntu 18.04和Ubuntu 20.04
但是Azure Kinect Sensor SDK官方只支持Ubuntu 18.04
Ubuntu20.04和22.04配置Azure Kinect Sensor SDK_第1张图片
不过Ubuntu 18.04的.deb安装包也能在Ubuntu 20.04和22.04上安装,安装方法如下

SDK安装

  • 官方镜像源中下载k4a-toolsUbuntu20.04和22.04配置Azure Kinect Sensor SDK_第2张图片

  • 下载libk4a和libk4a-devUbuntu20.04和22.04配置Azure Kinect Sensor SDK_第3张图片

  • 安装SDK

    dpkg -i libk4a1.4-dev_1.4.1_amd64.deb
    dpkg -i libk4a1.4_1.4.1_amd64.deb
    dpkg -i k4a-tools_1.4.1_amd64.deb
    

    注意:在Ubuntu22.04上安装的时候,会报错缺少依赖libsoundio1,而ubuntu22.04的镜像源只有libsoundio2libsoundio-dev,可以将镜像源临时换成20.04的,然后执行命令sudo apt updatesudo apt install libsoundio1。安装完成后,记得将镜像源再换回22.04的

  • 取消root权限启动:新建文件/etc/udev/rules.d/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"
    

    内容来自官方源码Azure-Kinect-Sensor-SDK/scripts/99-k4a.rules

PS:附上官方源码编译教程 Building and Dependencies

参考链接:Requesting Binaries for 20.04

SDK测试

将相机插上电源,并且使用数据线连到电脑的USB3.0接口(建议不要使用机箱前面的USB接口)
然后运行如下命令即可

k4aviewer

你可能感兴趣的:(ubuntu,linux,Azure,Kinect,ubuntu22.04,ubuntu20.04)