Ubuntu20.04装RealSense D455的驱动
官网链接和个人链接
1.安装环境:
系统:Ubuntu20.04
ROS:Noetic
视觉传感器:Intel RealSense D455
2.安装RealSense SDK
- 首先下载librealsense,
链接-----git-----官网git - 下载安装包并放到/home目录(建议改文件名字为librealsense,避免后续操作中make失败)
- 安装部分依赖
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,只要没有再抱错,就是成功。
提醒:如果没有下载git,就还是显示同样的错误
参考文章:git下载教程
4.出现-- Could NOT find OpenSSL, …的问题:点击
5.出现错误显示:fatal error: GL/glu.h: 没有那个文件或目录:点击
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