ubutnu16.04下Intel Realsense D435驱动的安装和python环境的配置
生活随笔
收集整理的這篇文章主要介紹了
ubutnu16.04下Intel Realsense D435驱动的安装和python环境的配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
ubutnu16.04下Intel Realsense D435驅動的安裝和python環境的配置
一、 Intel Realsense D435驅動的安裝
普遍操作:這里就復制別人的:
1、Register the server's public key: sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C8B3A55A6F3EFCDE (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: Ubuntu 16 LTS: sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u Ubuntu 18 LTS: sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u3、Install the libraries (see section below if upgrading packages): 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.Reconnect the Intel RealSense depth camera and run: realsense-viewer to verify the installation.配置好之后,在命令行中輸入:
realSense-viewer出現以下界面就是驅動安裝成功
二、SDK安裝+python環境配置
首先下載SDK包:https://github.com/IntelRealSense/librealsense
Building From Source Ubuntu 14.04/16.04 LTS Ensure apt-get is up to date 1、sudo apt-get update && sudo apt-get upgrade Note: Use sudo apt-get dist-upgrade, instead of sudo apt-get upgrade, in case you have an older Ubuntu 14.04 version Install Python and its development files via apt-get (Python 2 and 3 both work)2、sudo apt-get install python python-dev or sudo apt-get install python3 python3-dev Note: The project will only use Python 2 if it can't use Python 3 Run the top level CMake command with the following additional flag -DBUILD_PYTHON_BINDINGS=bool:true:3、mkdir buildcd buildcmake ../ -DBUILD_PYTHON_BINDINGS=bool:true -DPYTHON_EXECUTABLE=python的執行路徑 Note: To force compilation with a specific version on a system with both Python 2 and Python 3 installed, add the following flag to CMake command: -DPYTHON_EXECUTABLE=[full path to the exact python executable] (cmake常用套路了)make -j4sudo make install 4、update your PYTHONPATH environment variable to add the path to the pyrealsense library export PYTHONPATH=$PYTHONPATH:/usr/local/lib安裝成功后,打開python輸入 import pyrealsense2,發現還是沒有該模塊。
接下來需要自己安裝:
安裝完成后,再打開python,輸入可以
可以使用下面的代碼進行測試:
總結
以上是生活随笔為你收集整理的ubutnu16.04下Intel Realsense D435驱动的安装和python环境的配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python批量将pdf转成word_如
- 下一篇: 在idea中使用构造方法