Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
|
Note: Due to the USB 3.0 translation layer between native hardware and virtual machine, the librealsense team does not recommend or support installation in a VM.
Install librealsense in seconds on Ubuntu and other snap supported Linux distributions with:
snap install librealsense
Snaps contain all necessary dependencies required to run. The snap will get automatically updated when a new version is pushed to the store.
The project requires two external dependencies, glfw and libusb-1.0. The Cmake build environment additionally requires pkg-config.
Important Several scripts below invoke wget, git, add-apt-repository
which may be blocked by router settings or a firewall. Infrequently, apt-get mirrors or repositories may also timeout. For librealsense users behind an enterprise firewall, configuring the system-wide Ubuntu proxy generally resolves most timeout issues.
Update Ubuntu distribution, including getting the latest stable kernel
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
Check the kernel version - > uname -r
In case of stack Ubuntu 14 LTS with Kernel prior to 4.4.0-04 (e.g. 3.19..) the basic apt-get upgrade rule is not sufficient to bring the distribution to the latest baseline recommended.
Therefore, perform the following command to promote both Kernel and FrontEnd
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
Note the exact Kernel version being installed (4.4.0-XX) for the next step.
At the end update OS Boot Menu and reboot to enforce the correct kernel selection
sudo update-grub && sudo reboot
Interrupt the boot process at Grub2 Boot Menu -> "Advanced Options for Ubuntu" -> Select the kernel version installed in the previous step.
Complete the boot, login and verify that the required kernel version in place
uname -r
>= 4.4.0-50Install the packages required for librealsense build:
libusb-1.0 and pkg-config:
sudo apt-get install libusb-1.0-0-dev pkg-config
.glfw3:
For Ubuntu 14.04: use
./scripts/install_glfw3.sh
For Ubuntu 16.04 install glfw3 via
sudo apt-get install libglfw3-dev
Library Build Process
librealsense employs CMake as a cross-platform build and project management system. Navigate to librealsense root directory and run
mkdir build && cd build
cmake ../
cmake ../ -DBUILD_EXAMPLES=true
cmake ../ -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false
Generate and install binaries:
make && sudo make install
/usr/local/lib
, header files in /usr/local/include
/usr/local/bin
.Note: Running RealSense Depth Cameras on Linux requires applying patches to kernel modules.
Ensure no Intel RealSense cameras are presently plugged into the system.
Install udev rules located in librealsense source directory:
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger
Install openssl package required for kernel module build:
sudo apt-get install libssl-dev
Next, build the patched module for the desired machine configuration.
./scripts/patch-realsense-ubuntu-xenial.sh
cd ./scripts/
./patch-arch.sh
Check installation by examining the latest entries in kernel log:
sudo dmesg | tail -n 50
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 on 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 |