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

相关文章

gitlab安装及邮箱配置和常用使用方式

《gitlab安装及邮箱配置和常用使用方式》:本文主要介绍gitlab安装及邮箱配置和常用使用方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1.安装GitLab2.配置GitLab邮件服务3.GitLab的账号注册邮箱验证及其分组4.gitlab分支和标签的

SpringBoot3应用中集成和使用Spring Retry的实践记录

《SpringBoot3应用中集成和使用SpringRetry的实践记录》SpringRetry为SpringBoot3提供重试机制,支持注解和编程式两种方式,可配置重试策略与监听器,适用于临时性故... 目录1. 简介2. 环境准备3. 使用方式3.1 注解方式 基础使用自定义重试策略失败恢复机制注意事项

MySQL MCP 服务器安装配置最佳实践

《MySQLMCP服务器安装配置最佳实践》本文介绍MySQLMCP服务器的安装配置方法,本文结合实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下... 目录mysql MCP 服务器安装配置指南简介功能特点安装方法数据库配置使用MCP Inspector进行调试开发指

在Windows上使用qemu安装ubuntu24.04服务器的详细指南

《在Windows上使用qemu安装ubuntu24.04服务器的详细指南》本文介绍了在Windows上使用QEMU安装Ubuntu24.04的全流程:安装QEMU、准备ISO镜像、创建虚拟磁盘、配置... 目录1. 安装QEMU环境2. 准备Ubuntu 24.04镜像3. 启动QEMU安装Ubuntu4

Python UV安装、升级、卸载详细步骤记录

《PythonUV安装、升级、卸载详细步骤记录》:本文主要介绍PythonUV安装、升级、卸载的详细步骤,uv是Astral推出的下一代Python包与项目管理器,主打单一可执行文件、极致性能... 目录安装检查升级设置自动补全卸载UV 命令总结 官方文档详见:https://docs.astral.sh/

Nexus安装和启动的实现教程

《Nexus安装和启动的实现教程》:本文主要介绍Nexus安装和启动的实现教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、Nexus下载二、Nexus安装和启动三、关闭Nexus总结一、Nexus下载官方下载链接:DownloadWindows系统根

Java SWT库详解与安装指南(最新推荐)

《JavaSWT库详解与安装指南(最新推荐)》:本文主要介绍JavaSWT库详解与安装指南,在本章中,我们介绍了如何下载、安装SWTJAR包,并详述了在Eclipse以及命令行环境中配置Java... 目录1. Java SWT类库概述2. SWT与AWT和Swing的区别2.1 历史背景与设计理念2.1.

统一返回JsonResult踩坑的记录

《统一返回JsonResult踩坑的记录》:本文主要介绍统一返回JsonResult踩坑的记录,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录统一返回jsonResult踩坑定义了一个统一返回类在使用时,JsonResult没有get/set方法时响应总结统一返回

Go学习记录之runtime包深入解析

《Go学习记录之runtime包深入解析》Go语言runtime包管理运行时环境,涵盖goroutine调度、内存分配、垃圾回收、类型信息等核心功能,:本文主要介绍Go学习记录之runtime包的... 目录前言:一、runtime包内容学习1、作用:① Goroutine和并发控制:② 垃圾回收:③ 栈和

java对接海康摄像头的完整步骤记录

《java对接海康摄像头的完整步骤记录》在Java中调用海康威视摄像头通常需要使用海康威视提供的SDK,下面这篇文章主要给大家介绍了关于java对接海康摄像头的完整步骤,文中通过代码介绍的非常详细,需... 目录一、开发环境准备二、实现Java调用设备接口(一)加载动态链接库(二)结构体、接口重定义1.类型