赞
踩
ubuntu 16.04 安装realsense sdk 2
官方安装教程网址
官方步骤:
1、Register the server’s public key:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
In case the public key still cannot be retrieved, check and specify proxy settings:
export http_proxy="http://<proxy>:<port>"
, and rerun the command. See additional methods in the following link.
2、Add the server to the list of repositories:
sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils
The above two lines will deploy librealsense2 udev rules, build and activate kernel modules, runtime library and executable demos and tools.
3、Optionally install the developer and debug packages:
sudo apt-get install librealsense2-dev
sudo apt-get install librealsense2-dbg
With dev package installed, you can compile an application with librealsense using g++ -std=c++11 filename.cpp -lrealsense2 or an IDE of your choice.
4、测试安装结果,连上相机,输入 realsense-viewer
Reconnect the Intel RealSense depth camera and run: realsense-viewer to verify the installation.
Verify that the kernel is updated :
modinfo uvcvideo | grep “version:” should include realsense string
5、关于卸载
Uninstalling the Packages:
Important Removing Debian package is allowed only when no other installed packages directly refer to it. For example removing librealsense2-udev-rules requires librealsense2 to be removed first.
Remove a single package with:
sudo apt-get purge <package-name>
Remove all RealSense™ SDK-related packages with:
dpkg -l | grep "realsense" | cut -d " " -f 3 | xargs sudo dpkg --purge
CMake和gcc,我的环境里面以前已经安装过
参考:
https://blog.csdn.net/qq_42393859/article/details/85257685?utm_medium=distribute.pc_relevant.none-task-blog-2defaultbaidujs_title~default-0.no_search_link&spm=1001.2101.3001.4242.1
https://blog.csdn.net/weixin_44024460/article/details/89320469
https://www.freesion.com/article/265616043/
1)下载cmake-3.8.2.tar.gz : https://cmake.org/files/
or https://blog.csdn.net/qq_42393859/article/details/85251356
2)在主文件夹下新建tools/文件夹,将cmake-3.8.2.tar.gz解压之后放在tools/中,为了防止出现权限不足问题,直接对文件更改权限:
解压:sudo tar -zxvf cmake-3.8.2.tar.gz
赋权限:sudo chmod -R 777 cmake-3.8.2
安装gcc-c++:
sudo apt-get install build-essential
或者直接执行这两条命令
sudo apt-get install gcc
sudo apt-get install g++
进入文件夹下执行以下命令:
sudo ./bootstrap
sudo make
sudo make install
查看是否安装成功以及安装版本:
cmake --version
git clone https://github.com/IntelRealSense/librealsense.git
或官网的其他版本:https://github.com/IntelRealSense/librealsense/releases
配置开发环境:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo apt-get install git libssl-dev libusb-1.0-0-dev libudev-dev pkg-config libgtk-3-dev
sudo apt-get install libglfw3-dev
设置usb设备规则,进入下载的realsense sdk主目录,执行命令:
./scripts/setup_udev_rules.sh
Build and apply patched kernel modules for: * Ubuntu 14/16/18/20 with LTS kernel(drivers)
./scripts/patch-realsense-ubuntu-lts.sh
(连接好多文件,有点慢。)
进入下载的realsense sdk主目录,源码编译安装:
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=true
sudo make uninstall && make clean && make -j8 && sudo make install
参考链接:
https://www.freesion.com/article/5704459572/
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md
如果想安装python realsense , 直接pyrealsense2的安装即可
https://blog.csdn.net/qq_42393859/article/details/85044330
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。