|
| 1 | +# Install Intel® RealSense™ SDK |
| 2 | + |
| 3 | +Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras. |
| 4 | +The SDK allows depth and color streaming, and provides intrinsic and extrinsic calibration information. |
| 5 | +The library also offers synthetic streams (pointcloud, depth aligned to color and vise-versa), and a built-in |
| 6 | +support for record and playback of streaming sessions. |
| 7 | + |
| 8 | +Intel® RealSense™ SDK 2.0 supports Robot Operating System (ROS) and ROS 2, allowing you to access commonly used robotic functionality with ease. |
| 9 | + |
| 10 | +ROS is a set of open-source software libraries and tools that help you build robot applications. For more information, see https://www.ros.org/. |
| 11 | + |
| 12 | +## Installation |
| 13 | + |
| 14 | +1. Register the server's public key: |
| 15 | + |
| 16 | + ```bash |
| 17 | + |
| 18 | + sudo mkdir -p /etc/apt/keyrings |
| 19 | + curl -sSf https://librealsense.intel.com/Debian/librealsense.pgp | sudo tee /etc/apt/keyrings/librealsense.pgp > /dev/null |
| 20 | + ``` |
| 21 | + |
| 22 | +2. Ensure that apt HTTPS support is installed: |
| 23 | + |
| 24 | + ```bash |
| 25 | + |
| 26 | + sudo apt-get install apt-transport-https |
| 27 | + ``` |
| 28 | + |
| 29 | +3. Add the server to the list of repositories: |
| 30 | + |
| 31 | + ```bash |
| 32 | + |
| 33 | + echo "deb [signed-by=/etc/apt/keyrings/librealsense.pgp] https://librealsense.intel.com/Debian/apt-repo `lsb_release -cs` main" | \ |
| 34 | + sudo tee /etc/apt/sources.list.d/librealsense.list |
| 35 | + ``` |
| 36 | + |
| 37 | +4. Update your apt repository caches after setting up the repositories: |
| 38 | + |
| 39 | + ```bash |
| 40 | + |
| 41 | + sudo apt update |
| 42 | + ``` |
| 43 | + |
| 44 | +5. Install the RealSense drivers and libraries: |
| 45 | + |
| 46 | + ```bash |
| 47 | + sudo apt install librealsense2-dkms |
| 48 | + sudo apt install librealsense2=2.55.1-0~realsense.12474 |
| 49 | + ``` |
| 50 | + |
| 51 | +> **Attention:** |
| 52 | + The command above has fixed the ``librealsense2`` package version; therefore, you need to install dependent packages, for example ``librealsense2-utils``, ``librealsense2-dev``, and ``librealsense2-gl``. |
| 53 | + |
| 54 | +6. (Optional) Install the ROS wrappers for Intel RealSense depth cameras: |
| 55 | + |
| 56 | + <!--hide_directive::::{tab-set}hide_directive--> |
| 57 | + <!--hide_directive:::{tab-item}hide_directive--> **Jazzy** |
| 58 | + <!--hide_directive:sync: tab1 hide_directive--> |
| 59 | + |
| 60 | + ```bash |
| 61 | + sudo apt install ros-jazzy-realsense2-camera |
| 62 | + ``` |
| 63 | + |
| 64 | + <!--hide_directive:::hide_directive--> |
| 65 | + <!--hide_directive:::{tab-item}hide_directive--> **Humble** |
| 66 | + <!--hide_directive:sync: tab2 hide_directive--> |
| 67 | + |
| 68 | + ```bash |
| 69 | + sudo apt install ros-humble-realsense2-camera |
| 70 | + ``` |
| 71 | + |
| 72 | + <!--hide_directive:::hide_directive--> |
| 73 | + <!--hide_directive::::hide_directive--> |
| 74 | + |
| 75 | +#. (Optional) Install other tools or packages of Intel RealSense depth cameras: |
| 76 | + |
| 77 | + See the [installation link](https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md)> |
| 78 | + to install librealsense packages and more other tools from Intel® RealSense™ depth camera sources. |
| 79 | + |
| 80 | +## Troubleshooting |
| 81 | + |
| 82 | +### Errors for ``librealsense2-dkms`` installation |
| 83 | + |
| 84 | +If errors occur during ``librealsense2-dkms`` package installation, you have options to fix it: |
| 85 | + |
| 86 | +- Install librealsense SDK by using original Linux drivers. |
| 87 | + |
| 88 | + Once errors occur during installing ``librealsenses2-dkms`` package, it probably is introduced by unmatched kernel version. You can try the following workaround: |
| 89 | + |
| 90 | + ```bash |
| 91 | + |
| 92 | + sudo rm -rf /var/lib/dpkg/info/librealsense2-dkms* |
| 93 | + sudo apt install librealsense2-dkms |
| 94 | + ``` |
| 95 | + |
| 96 | +- If the option above doesn't work , try to build and install from the source code. |
| 97 | + |
| 98 | + Follow the steps in `the link <https://github.com/IntelRealSense/librealsense/blob/development/doc/installation.md>`_ to download the librealsense source code and build it. |
| 99 | + |
| 100 | +### Errors for unmet dependencies |
| 101 | + |
| 102 | +If you encounter unmet dependencies during the installation of ROS wrappers for Intel RealSense depth cameras, for example: |
| 103 | + |
| 104 | +```shell |
| 105 | + |
| 106 | +The following packages have unmet dependencies: |
| 107 | +ros-humble-librealsense2-tools : Depends: ros-humble-librealsense2 (= 2.55.1-1eci9) but 2.55.1-1jammy.20241125.233100 is to be installed |
| 108 | +E: Unable to correct problems, you have held broken packages. |
| 109 | +``` |
| 110 | + |
| 111 | +This issue is probably caused by the mismatched versions of the ROS wrapper and the librealsense2 package. |
| 112 | +You can try to fix it by specifying the version of the dependent package. You can try the following for the example given above: |
| 113 | + |
| 114 | +<!--hide_directive::::{tab-set}hide_directive--> |
| 115 | +<!--hide_directive:::{tab-item} hide_directive--> **Jazzy** |
| 116 | +<!--hide_directive:sync: tab1 hide_directive--> |
| 117 | + |
| 118 | +```bash |
| 119 | +sudo apt install ros-jazzy-librealsense2=2.55.1-1eci9 |
| 120 | +sudo apt install ros-jazzy-librealsense2-tools=2.55.1-1eci9 |
| 121 | +``` |
| 122 | + |
| 123 | +<!--hide_directive:::hide_directive--> |
| 124 | +<!--hide_directive:::{tab-item}hide_directive--> **Humble** |
| 125 | +<!--hide_directive:sync: tab2 hide_directive--> |
| 126 | + |
| 127 | +```bash |
| 128 | +sudo apt install ros-humble-librealsense2=2.55.1-1eci9 |
| 129 | +sudo apt install ros-humble-librealsense2-tools=2.55.1-1eci9 |
| 130 | +``` |
| 131 | + |
| 132 | +<!--hide_directive:::hide_directive--> |
| 133 | +<!--hide_directive::::hide_directive--> |
0 commit comments