Ubuntu20.04装RealSense D455的驱动
- Ubuntu20.04装RealSense D455的驱动
- 官网链接和个人链接
官网链接和个人链接
前言:这些是我ubuntu20.04安装时候所找到的方法,Ubuntu18也可以按这个装,而且问题会更少,安装更简单。
1.安装环境:
系统:Ubuntu20.04
ROS:Noetic
视觉传感器:Intel RealSense D455
2.安装RealSense SDK
cd librealsense
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
继续安装依赖-----不想因为我在下面所陈列的错误而反复出错的化,就去看看。
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger
mkdir build
cd build
cmake ../ -DBUILD_EXAMPLES=true
make
sudo make install
make步骤花费时间很长,可以去休息一下。
realsense-viewer
如果成功就可以看见点云图
上述过程出错(这些错误是我自己遇到的):
- 文件名字未修改而在make时直接显示不能进行(这个只是我遇到过,并不代表你一定要改,不改大概也可以)。
- sudo apt-get install libudev-dev pkg-config libgtk-3-dev直接失败,
libudev-dev : 依赖: libudev1 (= 245.4-4ubuntu3) 但是 245.4-4ubuntu3.13 正要被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系
我采取换源和配置了一下软件和更新里面的部分,如下图所示
换源
- cmake …/ -DBUILD_EXAMPLES=true失败,抱错(虽然提示是没有红色,但是要仔细看是否有错误提示,会影响后续操作)
CMake Error at /usr/share/cmake-3.16/Modules/ExternalProject.cmake:2421 (message):
error: could not find git for clone of libcurl Call Stack
(most recent call first):
/usr/share/cmake-3.16/Modules/Externa
lProject.cmake:3236 (_ep_add_download_command)
CMake/external_libcurl.cmake:17 (ExternalProject_Add)
CMake/global_config.cmake:93 (include)
CMakeLists.txt:48 (global_set_flags)
-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/librealsense-master/build/CMakeFiles/CMakeOutput.log".
方法1(我没成功):添加链接描述
其中版本不太对,也不太行。
上面那个博客方向可能会对,但是版本错了,我没有试
方法2(我成功了):如下图所示:打开external_libcurl.cmake,把GIT_REPOSITORY "https://github.com/curl/curl.git"改为GIT_REPOSITORY “git://github.com/curl/curl.git”,然后再make,只要没有再抱错,就是成功。
但是会受网络影响,贼难受,建议直接7.75版本永远的神,主要是对应、ubuntu18下载并改名为libcurl,然后放到build里面的third-party中去,还有就是把Cmake里面的external_libcurl.cmake文件中的 GIT_REPOSITORY "git://github.com/curl/curl.git"加一个#号,这样就会跳过报错了,如下图。
提醒:
1.如果没有下载git,就还是显示同样的错误。
2.如果网络太差,也会卡死。
上面就是准备下载的提示
这就是下载成功的提示
参考文章:git下载教程
4.出现-- Could NOT find OpenSSL, …的问题:点击
sudo apt-get install libssl-dev
5.出现错误显示:fatal error: GL/glu.h: 没有那个文件或目录:点击
sudo apt-get install libglu1-mesa-dev
6.报错
-- The CXX compiler identification is unknown
-- The C compiler identification is GNU 8.3.0
CMake Error at CMakeLists.txt:99 (enable_language):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
解决办法:
sudo apt install -y build-essential
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)