树莓派安装realsense自己的步骤梳理

树莓派3B+装上ubuntu 18.0.4的内核亲测是 4.15的,跟ubuntu官网一致。目前最新的也就是4.15,不知道realsense官网瞎扯什么4.16啥的干啥? 都还没有的东西,你写出来 扰乱天下么?!
依次输入运行安装以下:
echo ‘deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main’ | sudo tee /etc/apt/sources.list.d/realsense-public.list

sudo apt-key adv --keyserver keys.gnupg.net --recv-key 6F3EFCDE (建立许可证密钥)

sudo apt-get install cmake,git,make,wget (安装需要的程序包)

git clone https://github.com/IntelRealSense/librealsense librealsense (可直接下载下来,用)

sudo apt-get update && sudo apt-get upgrade(如果是新版系统和硬件,不更新应该也可以)

Navigate to librealsense root directory to run the following scripts.Unplug any connected Intel RealSense camera.

Install the core packages required to build librealsense binaries and the affected kernel modules:

sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev   (先装了再说下面)

Distribution-specific packages:
    Ubuntu 16:
    sudo apt-get install libglfw3-dev
    Ubuntu 18:
    sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev (我树莓派3B+的,上面装的ubuntu mate 18.0.4)

Run Intel Realsense permissions script located from librealsense root directory:

./scripts/setup_udev_rules.sh

Build and apply patched kernel modules for:Ubuntu 14/16/18 with LTS kernel script will download, patch and build realsense-affected kernel modules (drivers).

  • ./scripts/patch-realsense-ubuntu-lts.sh
    在librealsense根目录下执行:
    mkdir build
    cd build
    cmake … -DBUILD_EXAMPLES:BOOL=true
    sudo make (很耗时,得几个小时,且对于树莓派此步之前一定要建立swap file即虚拟内存,见我上篇博文)
    sudo make install

装好后会拷贝一份在如下目录:
The shared object will be installed in /usr/local/lib, header files in /usr/local/include.
The binary demos, tutorials and test files will be copied into /usr/local/bin

想执行看效果? 终端中直接进入例子目录,输入例子的文件名(可执行程序)即可执行。也可在图形界面下/usr/local/bin中,右键选择要执行的程序,以管理员身份运行,

you can compile an application with librealsense using:
g++ -std=c++11 filename.cpp -lrealsense2
or an IDE of your choice

官网安装链接(OpenGL不用管):
https://dev.intelrealsense.com/docs/using-depth-camera-with-raspberry-pi-3
https://github.com/IntelRealSense/librealsense/blob/development/doc/installation.md

你可能感兴趣的:(树莓派)