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

相关文章

SQL server数据库如何下载和安装

《SQLserver数据库如何下载和安装》本文指导如何下载安装SQLServer2022评估版及SSMS工具,涵盖安装配置、连接字符串设置、C#连接数据库方法和安全注意事项,如混合验证、参数化查... 目录第一步:打开官网下载对应文件第二步:程序安装配置第三部:安装工具SQL Server Manageme

Python中win32包的安装及常见用途介绍

《Python中win32包的安装及常见用途介绍》在Windows环境下,PythonWin32模块通常随Python安装包一起安装,:本文主要介绍Python中win32包的安装及常见用途的相关... 目录前言主要组件安装方法常见用途1. 操作Windows注册表2. 操作Windows服务3. 窗口操作

在Spring Boot中集成RabbitMQ的实战记录

《在SpringBoot中集成RabbitMQ的实战记录》本文介绍SpringBoot集成RabbitMQ的步骤,涵盖配置连接、消息发送与接收,并对比两种定义Exchange与队列的方式:手动声明(... 目录前言准备工作1. 安装 RabbitMQ2. 消息发送者(Producer)配置1. 创建 Spr

k8s上运行的mysql、mariadb数据库的备份记录(支持x86和arm两种架构)

《k8s上运行的mysql、mariadb数据库的备份记录(支持x86和arm两种架构)》本文记录在K8s上运行的MySQL/MariaDB备份方案,通过工具容器执行mysqldump,结合定时任务实... 目录前言一、获取需要备份的数据库的信息二、备份步骤1.准备工作(X86)1.准备工作(arm)2.手

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系统根