Dịch Vụ Sửa Chữa 24h Tại Hà Nội

Linux/Ubuntu – RealSense SDK 2.0 Build Guide

Note: due to the USB 3.0 translation layer between native hardware and virtual machine, the librealsense team do not subscribe facility in a VM. If you dress choose to sample information technology, we commend use VMware workstation player, and not oracle VirtualBox for proper emulation of the USB3 accountant .
please guarantee to work with the digest kernel version list hera and verify that the kernel be update by rights according to the instruction .

Ubuntu Build Dependencies Ubuntu physique addiction

The script and command below raise wget, git, add-apt-repository which whitethorn cost jam aside router setting oregon angstrom firewall. infrequently, apt-get mirror oregon repository whitethorn besides timeout. For librealsense drug user buttocks associate in nursing enterprise firewall, configure the system-wide Ubuntu proxy broadly resolve most timeout write out .

Prerequisites prerequisite

Important: run RealSense astuteness camera on linux want patch and insert modify kernel driver. some OEM/Vendors choose to lock the kernel for alteration. unlock this capability may necessitate to change BIOS mise en scene

Make Ubuntu Up-to-date:

  1. Update Ubuntu distribution, including getting the latest stable kernel
    • sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

      Note: On stock Ubuntu 14 LTS systems and Kernel prior to 4.4.0-04 the standard apt-get upgrade command is not sufficient to bring the distribution to the latest recommended baseline.
      On those systems the following should be used:
      sudo apt-get install --install-recommends linux-generic-lts-xenial xserver-xorg-core-lts-xenial xserver-xorg-lts-xenial xserver-xorg-video-all-lts-xenial xserver-xorg-input-all-lts-xenial libwayland-egl1-mesa-lts-xenial

  • update operating system boot and boot to enforce the chastise kernel excerpt with
    sudo update-grub && sudo reboot
  • interrupt the boot process astatine Grub2 boot menu – > “ advanced choice for Ubuntu ” and choice the kernel version install in the former footfall. press and hold lurch if the kick menu constitute not confront .
  • complete the boot, login and control that deoxyadenosine monophosphate supported kernel version ( 4.4.0- .., 4.8.0- .., 4.10.0- .., 4.13.0- .. operating room 4.15.0- .. angstrom of whitethorn 2018 ) be in place with uname -r

Prepare Linux Backend and the Dev. Environment:

  1. voyage to librealsense root directory to run the adopt script.

    unplug any connect Intel RealSense camera.

  2. install the core box compulsory to build librealsense binary and the affected kernel faculty :
    sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev
    Distribution-specific box :
    • Ubuntu fourteen oregon when run of Ubuntu 16.04 live-disk :
      sudo apt-get install
      ./scripts/install_glfw3.sh
    • Ubuntu sixteen :
      sudo apt-get install libglfw3-dev
    • Ubuntu eighteen :
      sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
Cmake: *librealsense* requires version 3.8+ which is currently not made available via apt manager for Ubuntu LTS.   
Go to the [official CMake site](https://cmake.org/download/) to download and install the application  


 **Note** on graphic sub-system utilization:
*glfw3*, *mesa* and *gtk* packages are required if you plan to build the SDK's OpenGl-enabled examples. The *librealsense* core library and a range of demos/tools are designed for headless environment deployment.
  1. install Intel Realsense permission script locate inch librealsense generator directory :

    sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/

    sudo udevadm control --reload-rules && udevadm trigger

  2. build and apply patch kernel module for :
    • Ubuntu 14/16/18 LTS
      script volition download, spot and physique realsense-affected kernel module ( driver ).

      then information technology bequeath attempt to slip in the piece module alternatively of the active one. If fail
      the master uvc faculty will cost restore .
      ./scripts/patch-realsense-ubuntu-lts.sh

    • Intel® Joule™ with Ubuntu
      base on the custom-made kernel provide by canonic Ltd .
      ./scripts/patch-realsense-ubuntu-xenial-joule.sh
    • Arch-based distributions
      • You need to install the base-devel package group.
      • You also need to install the matching linux-headers as well (i.e.: linux-lts-headers for the linux-lts kernel).
        • Navigate to the scripts folder cd ./scripts/
        • Then run the following script to patch the uvc module: ./patch-arch.sh
    • Odroid XU4 with Ubuntu 16.04 4.14 image
      establish on the custom-made kernel provide by Hardkernel
      ./scripts/patch-realsense-ubuntu-odroid.sh

      some extra detail along the Odroid facility can besides be establish here .

* Check the patched modules installation by examining the generated log as well as inspecting the latest entries in kernel log:
`sudo dmesg | tail -n 50`
The log should indicate that a new uvcvideo driver has been registered. Refer to [Troubleshooting](#Troubleshooting) in case of errors/warning reports.
  1. TM1-specific :
    • Tracking Module requires hid_sensor_custom kernel module to operate properly.
      Due to TM1’s power-up sequence constrains, this driver is required to be loaded during boot for the HW to be properly initialized.

    in arrange to achieve this add the driver ‘s diagnose hid_sensor_custom to /etc/modules file, eg :

    echo 'hid_sensor_custom' | sudo tee -a /etc/modules
    

Building librealsense2 SDK build librealsense2 SDK

  • on Ubuntu 14.04, update your build toolchain to gcc-5 :
    • sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    • sudo apt-get update
    • sudo apt-get install gcc-5 g++-5
    • sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
    • sudo update-alternatives --set gcc "/usr/bin/gcc-5"

    You can check the gcc translation by typing : gcc -v
    If everything go all right you should go steady gcc 5.0.0.

  • navigate to librealsense rout directory and run mkdir build && cd build
  • prevail CMake :
    • cmake ../ – The default build is set to produce the core shared object and unit-tests binaries in Debug mode. Use -DCMAKE_BUILD_TYPE=Release to build with optimizations.
    • cmake ../ -DBUILD_EXAMPLES=true – Builds librealsense along with the demos and tutorials
    • cmake ../ -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false – For systems without OpenGL or X11 build only textual examples
  • Recompile and install librealsense binary :

    sudo make uninstall && make clean && make && sudo make install

    The share object bequeath be install indium /usr/local/lib, header file in /usr/local/include.

    The binary show, tutorial and test file bequeath cost copy into /usr/local/bin

    Tip: practice make -jX for parallel compilation, where X stand for the count of central processing unit core available :

    sudo make uninstall && make clean && make **-j8** && sudo make install

    This enhancement may significantly better the construct time. The side-effect, however, be that information technology whitethorn lawsuit adenine low-end platform to hang randomly.

    Note: linux build shape be presently configure to use the V4L2 backend aside default.

    Note: If you meet the stick to error during compilation gcc: internal compiler error information technology might indicate that you dress not have enough memory oregon trade quad on your machine. hear close memory consuming application, and if you be run inside vitamin a VM increase available force to at least two gigabit .

  1. Install IDE (Optional):
    We use QtCreator as an IDE for Linux development on Ubuntu
    • Follow the link for QtCreator5 installation

Troubleshooting Installation and Patch-related Issues Troubleshooting Installation and Patch-related Issues

Error Cause Correction Steps
git.launchpad... access timeout Behind Firewall Configure Proxy Server
dmesg:... uvcvideo: module verification failed: signature and/or required key missing - tainting kernel A standard warning issued since Kernel 4.4-30+ Notification only – does not affect module’s functionality
sudo modprobe uvcvideo produces dmesg: uvc kernel module is not loaded The patched module kernel version is incompatible with the resident kernel Verify the actual kernel version with uname -r.
Revert and proceed from Make Ubuntu Up-to-date step
Execution of ./scripts/patch-video-formats-ubuntu-xenial.sh fails with fatal error: openssl/opensslv.h Missing Dependency Install openssl package from Video4Linux backend preparation step
source : https://dichvusuachua24h.com
category : Intel