一.安装SDK
今天我来配置一下微软公司的Azure Kinect DK深度相机,以前在ubuntu18.04上配置过,因为官方说唯一支持linux版本是18.04,所以在18.04中配置还算顺利

but这不代表不可以在更高版本的ubuntu中使用,只不过需要自己去多配置一些东西
apt 源安装
更新源:
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-add-repository https://packages.microsoft.com/ubuntu/22.04/prod
sudo apt-get update

接下来我们需要手动去安装一下sdk


然后按顺序解压安装



注意:在Ubuntu22.04 上安装的时候,会报错缺少依赖libsoundio1
,而ubuntu22.04的镜像源只有libsoundio2
和libsoundio-dev
解决办法:我们需要到网上自行安装libsoundio1(有找不到的伙伴可以私信我)


然后再安装tools这个包即可。

在Azure-Kinect-SensorSDK,下载整个代码,找到scripts文件夹下的99-k4a.rules,用指令:
cd ~/Azure-Kinect-Sensor-SDK
sudo cp scripts/99-k4a.rules /etc/udev/rules.d/
放到etc/udev/文件夹下即可。(也可以自行创建)

运行k4aviewer:
k4aviewer

二.使用ros2-humble-driver
这里我们需要自行去github上下载一下对应的ros2驱动包(找不到的伙伴可以私信我)

编译

运行

启动rviz2并添加image组件,选择对应话题就可以出来对应图像

三.find_object
