Ubuntu16.04安装iai_kinect2爬坑记录

2024-01-27 14:20

本文主要是介绍Ubuntu16.04安装iai_kinect2爬坑记录,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Ubuntu16.04安装iai_kinect2爬坑记录

安装iai_kinect2爬坑经共享

1. iai_kinect2下载安装

网上有很多的安装教程,将下载文件放入工作空间的src文件夹下。在src文件夹下打开终端输入命令

git clone https://github.com/code-iai/iai_kinect2.git
cd iai_kinect2
rosdep install -r --from-paths . 
cd ~/catkin_ws #进入自己的工作空间下
catkin_make -DCMAKE_BUILD_TYPE="Release"

理论上到这里,每行命令都成功的情况下,就算配置结束了,可以使用命令

roslaunch kinect2_bridge kinect2_bridge.launch

进行最后的效果预览。(最后有提供)

2. kinect2_XXXX: Cannot locate rosdep definition for [XXX]

当使用rosdep install -r --from-paths . 出现以下命令报错时,使用

rosdep install --from-paths ~/catkin_ws/src/iai_kinect2 --ignore-src -r  

注:使用自己的工作空间地址,如果依然报错,那就别管了。

3. Could not find a package configuration file provided by “cv_bridge” with any of the following names:

使用catkin_make -DCMAKE_BUILD_TYPE="Release"出现错误:

在这里插入图片描述

开始套娃~

看了网上很多教程,说可以使用

sudo apt-get install ros-kinect-cv-brigde

但是我根本没有这个软件包,会提示无法定位到软件包。没办法只能去直接下源码了。

 git clone --branch kinetic https://hub.fastgit.org/ros-perception/vision_opencv.git#或者使用git clone --branch kinetic https://github.com/ros-perception/vision_opencv.git

记得要下载正确的版本。

将下载好的文件放在你的工作空间的src文件夹下。这时候出现了一个新的有趣的事情。现在有两个选择。
(1)可以使用进入cv_brigde文件夹下,编译安装cv_brigde。(不推荐,因为后面的错没法弄,但如果后面不报错,这个方法也可行)

cd cv_brigde
mkdir build && cd build
cmake ..
make 
make install #可能会报错,建议加上sudo

(2)进入工作空间下使命catkin命令编译安装

catkin_make --pkg vision_opencv

再次使用命令

catkin_make -DCMAKE_BUILD_TYPE="Release"

然后出现错误
在这里插入图片描述
可以看到又少了一个,没办法,缺哪个装哪个,这个不需要指定版本。

git clone https://github.com/ros-perception/image_transport_plugins.git

文件下载下来,不需要将其中的内容取出来,不然要要把其中的内容一个一个放进去。
再次使用命令

catkin_make -DCMAKE_BUILD_TYPE="Release"

这时候就会直接成功了。

4. Failed to load nodelet [/kinect2_points_xyzrgb_XX] of type [depth_image_proc/point_cloud_xyzrgb]

编译成功以后不要忘记

source devel/setup.bash

然后使用命令

roslaunch kinect2_bridge kinect2_bridge.launch 

然后就出红了。

[ERROR] [1625489619.447342991]: Failed to load nodelet [/kinect2_points_xyzrgb_sd] of type [depth_image_proc/point_cloud_xyzrgb] even after refreshing the cache: According to the loaded plugin descriptions the class depth_image_proc/point_cloud_xyzrgb with base class type nodelet::Nodelet does not exist. Declared types are  kinect2_bridge/kinect2_bridge_nodelet nodelet_tutorial_math/Plus
[ERROR] [1625489619.447363189]: The error before refreshing the cache was: According to the loaded plugin descriptions the class depth_image_proc/point_cloud_xyzrgb with base class type nodelet::Nodelet does not exist. Declared types are  kinect2_bridge/kinect2_bridge_nodelet nodelet_tutorial_math/Plus
[FATAL] [1625489619.447479178]: Failed to load nodelet '/kinect2_points_xyzrgb_sd` of type `depth_image_proc/point_cloud_xyzrgb` to manager `kinect2'
[ERROR] [1625489619.456329901]: Failed to load nodelet [/kinect2_points_xyzrgb_qhd] of type [depth_image_proc/point_cloud_xyzrgb] even after refreshing the cache: According to the loaded plugin descriptions the class depth_image_proc/point_cloud_xyzrgb with base class type nodelet::Nodelet does not exist. Declared types are  kinect2_bridge/kinect2_bridge_nodelet nodelet_tutorial_math/Plus
[ERROR] [1625489619.456348069]: The error before refreshing the cache was: According to the loaded plugin descriptions the class depth_image_proc/point_cloud_xyzrgb with base class type nodelet::Nodelet does not exist. Declared types are  kinect2_bridge/kinect2_bridge_nodelet nodelet_tutorial_math/Plus
[FATAL] [1625489619.456460876]: Failed to load nodelet '/kinect2_points_xyzrgb_qhd` of type `depth_image_proc/point_cloud_xyzrgb` to manager `kinect2'
[ERROR] [1625489619.464895019]: Failed to load nodelet [/kinect2_points_xyzrgb_hd] of type [depth_image_proc/point_cloud_xyzrgb] even after refreshing the cache: According to the loaded plugin descriptions the class depth_image_proc/point_cloud_xyzrgb with base class type nodelet::Nodelet does not exist. Declared types are  kinect2_bridge/kinect2_bridge_nodelet nodelet_tutorial_math/Plus
[ERROR] [1625489619.464912232]: The error before refreshing the cache was: According to the loaded plugin descriptions the class depth_image_proc/point_cloud_xyzrgb with base class type nodelet::Nodelet does not exist. Declared types are  kinect2_bridge/kinect2_bridge_nodelet nodelet_tutorial_math/Plus
[FATAL] [1625489619.465045516]: Failed to load nodelet '/kinect2_points_xyzrgb_hd` of type `depth_image_proc/point_cloud_xyzrgb` to manager `kinect2'

如果你使用的rosrun命令,其实也会出错,只是没显示出来而已。下载一个image_pipeline。放入src文件夹下。

git clone --branch kinetic https://github.com/ros-perception/image_pipeline.git

再次使用命令编译安装

catkin_make --pkg image_pipeline

这个时候如果再出现类似的问题接着装就好了。

再次使用命令

roslaunch kinect2_bridge kinect2_bridge.launch

出现下图表示正确
在这里插入图片描述

5. 结果展示

最后新开终端输入命令

source devel/setup.bash
rosrun kinect2_viewer kinect2_viewer 

结果展示
在这里插入图片描述
爬坑结束。

这篇关于Ubuntu16.04安装iai_kinect2爬坑记录的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/650498

相关文章

Win10安装Maven与环境变量配置过程

《Win10安装Maven与环境变量配置过程》本文介绍Maven的安装与配置方法,涵盖下载、环境变量设置、本地仓库及镜像配置,指导如何在IDEA中正确配置Maven,适用于Java及其他语言项目的构建... 目录Maven 是什么?一、下载二、安装三、配置环境四、验证测试五、配置本地仓库六、配置国内镜像地址

Python安装Pandas库的两种方法

《Python安装Pandas库的两种方法》本文介绍了三种安装PythonPandas库的方法,通过cmd命令行安装并解决版本冲突,手动下载whl文件安装,更换国内镜像源加速下载,最后建议用pipli... 目录方法一:cmd命令行执行pip install pandas方法二:找到pandas下载库,然后

java中pdf模版填充表单踩坑实战记录(itextPdf、openPdf、pdfbox)

《java中pdf模版填充表单踩坑实战记录(itextPdf、openPdf、pdfbox)》:本文主要介绍java中pdf模版填充表单踩坑的相关资料,OpenPDF、iText、PDFBox是三... 目录准备Pdf模版方法1:itextpdf7填充表单(1)加入依赖(2)代码(3)遇到的问题方法2:pd

Linux系统中查询JDK安装目录的几种常用方法

《Linux系统中查询JDK安装目录的几种常用方法》:本文主要介绍Linux系统中查询JDK安装目录的几种常用方法,方法分别是通过update-alternatives、Java命令、环境变量及目... 目录方法 1:通过update-alternatives查询(推荐)方法 2:检查所有已安装的 JDK方

SQL Server安装时候没有中文选项的解决方法

《SQLServer安装时候没有中文选项的解决方法》用户安装SQLServer时界面全英文,无中文选项,通过修改安装设置中的国家或地区为中文中国,重启安装程序后界面恢复中文,解决了问题,对SQLSe... 你是不是在安装SQL Server时候发现安装界面和别人不同,并且无论如何都没有中文选项?这个问题也

2025版mysql8.0.41 winx64 手动安装详细教程

《2025版mysql8.0.41winx64手动安装详细教程》本文指导Windows系统下MySQL安装配置,包含解压、设置环境变量、my.ini配置、初始化密码获取、服务安装与手动启动等步骤,... 目录一、下载安装包二、配置环境变量三、安装配置四、启动 mysql 服务,修改密码一、下载安装包安装地

Redis MCP 安装与配置指南

《RedisMCP安装与配置指南》本文将详细介绍如何安装和配置RedisMCP,包括快速启动、源码安装、Docker安装、以及相关的配置参数和环境变量设置,感兴趣的朋友一起看看吧... 目录一、Redis MCP 简介二、安www.chinasem.cn装 Redis MCP 服务2.1 快速启动(推荐)2.

在macOS上安装jenv管理JDK版本的详细步骤

《在macOS上安装jenv管理JDK版本的详细步骤》jEnv是一个命令行工具,正如它的官网所宣称的那样,它是来让你忘记怎么配置JAVA_HOME环境变量的神队友,:本文主要介绍在macOS上安装... 目录前言安装 jenv添加 JDK 版本到 jenv切换 JDK 版本总结前言China编程在开发 Java

Linux下在线安装启动VNC教程

《Linux下在线安装启动VNC教程》本文指导在CentOS7上在线安装VNC,包含安装、配置密码、启动/停止、清理重启步骤及注意事项,强调需安装VNC桌面以避免黑屏,并解决端口冲突和目录权限问题... 目录描述安装VNC安装 VNC 桌面可能遇到的问题总结描js述linux中的VNC就类似于Window

虚拟机Centos7安装MySQL数据库实践

《虚拟机Centos7安装MySQL数据库实践》用户分享在虚拟机安装MySQL的全过程及常见问题解决方案,包括处理GPG密钥、修改密码策略、配置远程访问权限及防火墙设置,最终通过关闭防火墙和停止Net... 目录安装mysql数据库下载wget命令下载MySQL安装包安装MySQL安装MySQL服务安装完成