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 support installation in a VM. If you do choose to try it, we recommend using VMware Workstation Player, and not Oracle VirtualBox for proper emulation of the USB3 controller.
Make sure to have git and cmake installed as these are required for librelasense build: sudo apt-get install git cmake3
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.
Important: Running RealSense Depth Cameras on Linux requires patching and inserting modified kernel drivers. Some OEM/Vendors choose to lock the kernel for modifications. Unlocking this capability may requires to modify BIOS settings
Make Ubuntu Up-to-date:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
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
sudo update-grub && sudo reboot
uname -r
Video4Linux backend preparation:
sudo apt-get install libssl-dev
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger
./scripts/patch-realsense-ubuntu-xenial.sh
./scripts/patch-realsense-ubuntu-xenial-joule.sh
cd ./scripts/
./patch-arch.sh
sudo dmesg | tail -n 50
Install the packages required for librealsense build: libusb-1.0, pkg-config and libgtk-3: sudo apt-get install libusb-1.0-0-dev pkg-config libgtk-3-dev
. Note: glfw3 and gtk are only required if you plan to build the examples, not for the librealsense core library.
glfw3:
sudo apt-get install libglfw3-dev
./scripts/install_glfw3.sh
TM1-specifics:
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 order to accomplish this add the driver's name hid_sensor_custom to /etc/modules
file, eg: ```sh echo 'hid_sensor_custom' | sudo tee -a /etc/modules
``
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 version by typing: gcc -v
> If everything went fine you should see gcc 5.0.0.
mkdir build && cd build
cmake ../
- The default build is set to produce the core shared object and unit-tests binaries in Debug mode. Use -D CMAKE_BUILD_TYPE=release
to build with optimizations.cmake ../ -DBUILD_EXAMPLES=true
- Builds librealsense along with the demos and tutorialscmake ../ -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false
- For systems without OpenGL or X11 build only textual examplesRecompile and install librealsense binaries:
sudo make uninstall && make clean && make && sudo make install
/usr/local/lib
, header files in /usr/local/include
/usr/local/bin
make -jX
* for parallel compilation, where *X
* stands for the number of CPU cores available:sudo make uninstall && make clean && make -j8 && sudo make install
gcc: internal compiler error
it might indicate that you do not have enough memory or swap space on your machine. Try closing memory consuming applications, and if you are running inside a VM increase available RAM to at least 2 GB.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 |