三维重建&&路径规划(二)Ubuntu18.04(ros-melocdic )驱动 Azure Kinect DK 相机

三维重建&&路径规划(二)

一、Fast planner在Ubuntu20.04(ROS noetic)上的实现

二、Ubuntu18.04(ros-melocdic )驱动 Azure Kinect DK 相机


安装步骤

1.源码下载

git clone https://github.com/microsoft/Azure-Kinect-Sensor-SDK

2.编译过程

cd Azure-Kinect-Sensor-SDK/
mkdir build && cd build
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod
sudo apt-get update
sudo apt install libk4a1.4
sudo apt install libk4a1.4-dev
sudo apt install k4a-tools
cmake .. -GNinja

此时可能会出现如下错误:

-- Setting build type to 'RelWithDebInfo' as none was specified.
CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/home/j/Azure-Kinect-Sensor-SDK/build/CMakeFiles/CMakeOutput.log".

这个是因为没有安装ninja导致的。安装ninjia

sudo apt install ninja-build

继续编译:

cmake .. -GNinja
ninja

出错:

ninja: error: 'LIBSOUNDIO_LIB-NOTFOUND', needed by 'bin/k4aviewer', missing and no known rule to make it

看错误是因为缺少libsoundio-dev库,所以安装库:

sudo apt install libsoundio-dev

重新编译继续安装:

cmake .. -GNinja 
ninja

还有错误:

./extern/libusb/src/libusb/os/linux_udev.c:40:10: fatal error: libudev.h: 没有那个文件或目录
 #include <libudev.h>
          ^~~~~~~~~~~
compilation terminated.
[252/467] Building C object extern/lib...bUSB.dir/src/libusb/os/linux_usbfs.c.o
../extern/libusb/src/libusb/os/linux_usbfs.c: In function ‘linux_get_parent_info’:
../extern/libusb/src/libusb/os/linux_usbfs.c:1081:9: warning: implicit declaration of function ‘asprintf’; did you mean ‘vsprintf’? [-Wimplicit-function-declaration]
   ret = asprintf (&parent_sysfs_dir, "usb%s", tmp);
         ^~~~~~~~
         vsprintf
[256/467] Building CXX object tests/Un...iles/depthmcu_ut.dir/depthmcu_ut.cpp.o
ninja: build stopped: subcommand failed.

还是因为缺少库文件,继续装库:

sudo apt-get install libusb-1.0-0-dev
sudo apt-get install libudev-dev

继续编译:

ninja

看到了这一行,说明编译成功了

[467/467] Linking CXX executable bin/k4aviewer

这个时候连接相机,输入命令进入SDK:

sudo ./bin/k4aviewer

可能会出现如下错误和情况:

if you unplugged the device,you must close and reopen the device

在这里插入图片描述
新开一个终端输入:

cd  /usr/lib/x86_64-linux-gnu/libk4a1.4
sudo cp libdepthengine.so.2.0 /usr/lib/x86_64-linux-gnu

然后在原来的终端中重新输入:

./bin/k4aviewer

问题解决

  • 0
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值