I’ve been writing an Intel Realsense D435 vs ZED mini comparison post, but in a recent project I was doing, I needed to install D435 on a fresh copy of Ubuntu 16.04 and thought that it might be useful to document the process here.
System Preparation
1. Before installing the latest SDK, we need to modify the kernel. Kernel versions 4.4.0-x, 4.8.0-x, 4.10.0-x, 4.13.0-x, or 4.15.0-x are supported as of this post. Check your Ubuntu installation kernel version by running the following command in your terminal:
1 |
uname -r |
2. Install some core packages that allow you to build librealsense.
1 |
sudo apt-get install git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev |
3. I am on Ubuntu 16.04, so you also need to install:
1 |
sudo apt-get install libglfw3-dev |
4. Apply the Realsense permissions scripts located in the librealsense source directory. Again, note that this command needs to be run inside your librealsense folder!
1 2 |
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/ sudo udevadm control --reload-rules && udevadm trigger |
5. Finally, let’s download, patch, and build your custom kernel.
1 |
./scripts/patch-realsense-ubuntu-lts.sh |
If the above is a success, you will get prints that show that your videodev, uvcvideo, hid_sensor_accel_3d, and hid_sensor_gyro_3d has been replaced and this procedure was a success.
Building the SDK
1. I’m going to assume you have CMake installed and your build toolchain is gcc-5. If you are not sure, run:
1 |
gcc --version |
2. Now, let’s run CMake! I am including the ‘Examples’ option and the ‘Python Bindings’ option since I’d assume you would want to see an example and many people use Python. Feel free to turn them off by removing them.
1 2 |
mkdir build && cd build cmake ../ -DBUILD_EXAMPLES=true -DBUILD_PYTHON_BINDINGS=true |
3. Once CMake has generated the necessary files, let’s install it. In case you have already run ‘make’ in this folder previously, run the following for convenience:
1 |
sudo make uninstall && make clean && make && sudo make install |
3.a Obviously, feel free todo parallel compilation if your system allows this by replacing make with make -jX
4. Once the SDK is installed, run one of the examples to make sure that everything is installed well!
How do I run the examples?