当前位置:网站首页>Melodic + Realsense D435i 配置及错误问题解决
Melodic + Realsense D435i 配置及错误问题解决
2022-07-25 14:19:00 【这世界比瞳孔还漆黑】
Melodic + Realsense D435i 配置及错误问题解决
文章简述:本文主要讲述笔者在进行基于ROS的机器视觉开发中涉及到的相机驱动配置问题,讲述如何安装Realsense的相机驱动以及相机与ROS支持的功能包,并针对安装过程中出现的错误进行分析并提供相应的解决方案。
安装环境:
虚拟机:VMware
系统版本:Ubuntu 18.04
ROS版本:Melodic
摄像头:Intel Realsense D435i
RealSense SDK安装
# RealSense SDK github
github:https://github.com/IntelRealSense/librealsense
1、克隆SDK
打开终端,在终端中输入以下命令
git clone https://github.com/IntelRealSense/librealsense
cd librealsense
2、安装相关依赖
在原先的终端下,分别输入以下命令完成相关依赖的安装
sudo apt-get install libudev-dev pkg-config libgtk-3-dev
sudo apt-get install libusb-1.0-0-dev pkg-config
sudo apt-get install libglfw3-dev
sudo apt-get install libssl-dev
3、安装权限脚本
在原先的终端下,分别输入以下命令完成相关依赖的安装
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger
4、进行编译与安装
执行以下命令实现编译与安装
mkdir build
cd build
cmake ../ -DBUILD_EXAMPLES=true
make
sudo make install
5、测试安装是否成功
打开新的终端,在终端中输入以下命令验证相机驱动是否安装成功
cd librealsense/build/examples/capture
./rs-capture
安装成功则可以看到输入命令后打开一个窗口,窗口中显示相机拍摄到的画面如下图所示。
6、错误汇总
0x01 进行编译与安装相关错误
1、问题描述
在根据本文章的相关步骤进行驱动安装与配置时,在第四步进行编译与安装,执行以下指令,出现如图所示的错误提示
cmake ../ -DBUILD_EXAMPLES=true

通过终端反馈的错误信息我们可以知道,该错误出现的主要原因是librealsense/build/commom/fw目录中的文件L5XX_FW_Image-1.4.1.2.bin与在cmake时访问的远程文件存在哈希值匹配错误,即上面提及的expected hash与actual hash存在差异。
2、解决方案
访问以下链接(该链接在终端中提及),下载L5XX_FW_Image-1.4.1.2.bin,并将其更新至librealsense/build/commom/fw目录中
realsense-hw-public.s3.amazonaws.com/Releases/L5xx/FW/L5XX_FW_Image-1.4.1.2.bin
更新文件后再次执行以下命令,问题解决,最终显示如图所示的结果
cmake ../ -DBUILD_EXAMPLES=true

0x02 测试安装错误汇总
1、问题描述
按照本文章完成驱动编译与安装后,进入测试安装步骤时,运行如下指令,出现如图所示错误
cd librealsense/build/examples/capture
./rs-capture

出现该错误的原因是,由于RealSense D435i是RGBD相机,也就是颜色与深度相机,其数据量大,需要使用USB3.0的接口才能承受大数据流的传输,如果您使用的是USB2.0接口,则会出现上述的错误提示。
2、解决方案
更换USB接口即可解决该问题
3、问题解析
如何判断USB接口是2.0还是3.0呢。
打开新的终端,输入以下命令并执行
cd librealsense/build/examples/C/depth/
./rs-depth
如果你使用的是USB2.0的接口,终端反馈如下图所示
如果你使用的是USB拓展器并且拓展器接的是USB3.0接口,终端反馈如下图所示
如果你使用的是USB3.0接口,终端反馈如下图所示
RealSense-ROS安装
如果你已经新建了ROS工作空间,或者已经建好了ROS工作空间,则可以直接在工作空间的src目录下克隆相关功能包,然后进行编译,具体命令参考下方:
#已建好工作空间
cd catkin_ws/src/
git clone https://github.com/IntelRealSense/realsense-ros.git
git clone https://github.com/pal-robotics/ddynamic_reconfigure.git
cd ~/catkin_ws && catkin_make
#未建立工作空间
mkdir -p ~/catkin_ws/src
catkin_init_workspace
cd ..
catkin_make
cd src/
git clone https://github.com/IntelRealSense/realsense-ros.git
git clone https://github.com/pal-robotics/ddynamic_reconfigure.git
cd ~/catkin_ws && catkin_make
完成上述步骤后,打开新的终端,使用以下命令进行测试:
roslaunch realsense2_camera demo_pointcloud.launch
总结
本文主要讲述笔者在进行基于ROS的机器视觉学习过程中,安装相机驱动的方法与解决问题的办法,在这过程中,笔者参考了很多的文章,借着其他人的肩膀,写下了该文,希望能够对浏览到此文章的你具有一定的帮助。
边栏推荐
- word设置粘贴仅保留文本
- opencv视频跟踪「建议收藏」
- ~4.1 sword finger offer 05. replace spaces
- Xintang nuc980 set DHCP or static IP
- Day1: 130 questions in three languages
- Summary of some problems about left value and right value [easy to understand]
- Mysql表的操作
- Teach you how to apply for SSL certificate
- Application engineering safety monitoring of wireless vibrating wire acquisition instrument
- That day, I installed a database for my sister... Just help her sort out another shortcut
猜你喜欢

安防市场进入万亿时代,安防B2B网上商城平台精准对接深化企业发展路径

~5 new solution of CCF 2021-12-2 sequence query

Interpretation of featdepth self-monitoring model for monocular depth estimation (Part I) -- paper understanding and core source code analysis

Doris学习笔记之与其他系统集成

Deep understanding of pytorch distributed parallel processing tool DDP -- starting from bugs in engineering practice

【目录爆破工具】信息收集阶段:robots.txt、御剑、dirsearch、Dirb、Gobuster

Working mode and sleep mode of nlm5 series wireless vibrating wire sensor acquisition instrument

Tm1637 four digit LED display module Arduino driver with second dot

Oka pass rights and interests analysis is the best choice to participate in okaleido ecological construction

Common problems in the use of wireless vibrating wire acquisition instrument
随机推荐
Wangeditor rich text editor
金鱼哥RHCA回忆录:CL210管理存储--管理共享文件系统
einsum(): operands do not broadcast with remapped shapes [original->remapped]: [1, 144, 20, 17]->[1,
OverTheWire-Bandit
Deep understanding of pytorch distributed parallel processing tool DDP -- starting from bugs in engineering practice
From fish eye to look around to multi task King bombing -- a review of Valeo's classic articles on visual depth estimation (from fisheyedistancenet to omnidet) (Part 2)
Xintang nuc980 set DHCP or static IP
From Anaconda to tensorflow to jupyter, step on the pit and fill it all the way
Four methods of importing CSV text files into Excel
Pytorch uses tensorboard to realize visual summary
Structure size
Runtimeerror: CUDA out of memory (solved) [easy to understand]
Realize a family security and environmental monitoring system (II)
It is predicted that 2021 will accelerate the achievement of super automation beyond RPA
Oka pass rights and interests analysis is the best choice to participate in okaleido ecological construction
Depth estimation self-monitoring model monodepth2 paper summary and source code analysis [theoretical part]
Data analysis business core
科隆新能源IPO被终止:拟募资6亿 先进制造与战新基金是股东
Goldfish rhca memoirs: cl210 management storage -- object storage
einsum(): operands do not broadcast with remapped shapes [original->remapped]: [1, 144, 20, 17]->[1,