librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Release to Ubuntu 22.4 / jammy

Open doisyg opened this issue 2 years ago • 27 comments

Now that ubuntu 22.04 is out, would it be possible to get updated binaries or if they are the same to update the debian repo ?

doisyg avatar Apr 23 '22 15:04 doisyg

Hi @doisyg The librealsense SDK currently officially supports up to Ubuntu 20.04 (Focal) at the time of writing this. Support for newer Ubuntu versions will be announced at a future date.

You should be able to attempt to build the SDK from source code with CMake for Jammy immediately though if the SDK is built with the RSUSB backend method, as that type of librealsense build is not dependent on Linux versions or kernel versions and does not require patching

MartyG-RealSense avatar Apr 23 '22 15:04 MartyG-RealSense

A roadmap for a proper release to the current Ubuntu LTS (22.04) would be a minimum. I believe there are very few adaptation to make for the tooling executables to work (i.e realsense-viewer). The library itself works just fine by forcing the installation of the focal deb: Screenshot from 2022-05-04 09-31-54

doisyg avatar May 04 '22 07:05 doisyg

Thanks so much @doisyg for your confirmation that librealsense can be made to work with Ubuntu 22.04.

MartyG-RealSense avatar May 04 '22 16:05 MartyG-RealSense

Intel do not provide schedules and roadmaps in advance for possible supported RealSense features in the future, however.

Why not? Can we please get real support instead of canned responses here? This is the LTS release of the most popular Linux distro in the world, and by far the most popular OS for robots, a little friendliness in communication with the dev community about timelines would go a long way. We do pay for these devices.

dheera avatar May 06 '22 08:05 dheera

It doesn't make sense to close this issue until realsense is properly released to Ubuntu 22.04. And this is the good place to communicate about the progress, schedule, beta and blocking points I believe.

doisyg avatar May 19 '22 08:05 doisyg

Well, if it is going to be released for Jammy, this issue should be left open until it is. There is no problem in leaving issues open for a long time, it is actually good practice, signaling to the community that it is being addressed, for instance: https://github.com/ros-planning/navigation2/issues/1391 Closing the issue, on the opposite, maintain the doubt that it will never be done. And if that's the case, I need to plan and organize (I have more than 300 D435 in production to maintain), and I guess it is the same for many other people using D400 cameras in production. The realsense support improved compared to the early days of R200s but its history is a subject of stress for many products relying on it (I am sure @SteveMacenski can relate) and your response (and the overall realsense communication) is not at all reassuring. To the point that when starting a new project, many people (including myself) are looking for alternatives.

doisyg avatar May 19 '22 09:05 doisyg

For stable long-term support I would recommend using SDK and firmware pairings that Intel has categorized as Production (suitable for critical applications and commercial products). The most recent Production configuration at the time of writing this is SDK 2.50.0 and firmware 5.13.0.50.

https://dev.intelrealsense.com/docs/recommended-production-camera-configurations

MartyG-RealSense avatar May 19 '22 09:05 MartyG-RealSense

To @doisyg ’s comment, that attitude is incredibly problematic and why most companies are looking to Realsense alternatives even though they dont want to. Hardware is great, software support is some of the worst I’ve ever run into… it should take a day to release for 22.04 but Intel really can’t spend a day on it?

SteveMacenski avatar May 19 '22 17:05 SteveMacenski

This problem is not solved but closed!? Can you reopen this issue so that people don't look for solutions in this thread when there are none?

smorillon avatar May 20 '22 14:05 smorillon

Hi, I represent a company very well established in the ROS 2 community (PickNik). We've worked with 70+ companies, including Intel, helping them best use ROS with their robots, and we frequently recommend and sell Realsense cameras into our client projects. However we are switching to Jammy and a lack of driver support is a pretty big deal for us.

that attitude is incredibly problematic and why most companies are looking to Realsense alternatives even though they dont want to. Hardware is great, software support is some of the worst I’ve ever run into… it should take a day to release for 22.04 but Intel really can’t spend a day on it?

I generally agree with @SteveMacenski's sentiment here.

davetcoleman avatar Jun 05 '22 19:06 davetcoleman

Ubuntu 22.04 librealsense Debians & ROS2 Humble RS camera node support are on the future roadmap. Stay tuned...

Nir-Az avatar Jun 29 '22 19:06 Nir-Az

Hi. I wrote to Intel Realsense's sales team to ask for a timeline on the release (the company I work for relies on realsense cameras for the main product as well). He told me the release was planned for December 31st, but that they would try their best to push it forward. Sadly it seems that it will still be a long time :(

pepisg avatar Jun 30 '22 14:06 pepisg

Ubuntu 22.04 librealsense Debians & ROS2 Humble RS camera node support are on the future roadmap. Stay tuned...

This is reassuring and then

He told me the release was planned for December 31st

this is alarming

There is almost nothing to do. As described above, it is already working on Humble/Jammy by forcing the install of the Focal packets (at least for the D435s). Just add Jammy to the deb repo. What's missing is maybe the kernel patch for the metadata, but for many of us it is not needed (and it was already the case for the lastest hwe kernel in Focal). And a recompilation of the realsense-viewer GUI. If the timeline is really 31st of December, I am going to end up doing it and creating an alternate deb repo.

I don't understand how complex stacks like Moveit 2 or nav2 are ready very soon after the Humble release, and something as trivial as this is taking months.

doisyg avatar Jun 30 '22 17:06 doisyg

There is a draft kernel patch in the PR https://github.com/IntelRealSense/librealsense/pull/10625 It should enable metadata on Ubuntu using kernel 5.13/5.15.

BTW, I have a pre-built package for testing in here.

mengyui avatar Jul 01 '22 05:07 mengyui

Hi Realsense team, We strive to migrate to Ros2-humble (which is based on Ubuntu2204).

relasense SDK

As suggested, we tried compiling relasense SDK on U2204. https://github.com/IntelRealSense/librealsense.git It is compiled.

realsense_viewer:

Also works but we see this error(in red box) which does not go away even after applying udev rules from librelasense repo & rebooting machine. Please suggest solution for it: image

ros2-wrapper:

The ros2-wrapper for realsense seems not working when compiled on ros2-humble. Its compiled but a small patch in makefile was needed. Is it expected and can this patch be released officially?

diff --git a/realsense2_camera/CMakeLists.txt b/realsense2_camera/CMakeLists.txt
index e55490d..90cfbf3 100644
--- a/realsense2_camera/CMakeLists.txt
+++ b/realsense2_camera/CMakeLists.txt
@@ -146,6 +146,10 @@ elseif("$ENV{ROS_DISTRO}" STREQUAL "rolling")
   message(STATUS "Build for ROS2 Rolling")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DROLLING")
   set(SOURCES "${SOURCES}" src/ros_param_backend_foxy.cpp)
+elseif("$ENV{ROS_DISTRO}" STREQUAL "humble")
+  message(STATUS "Build for ROS2 Humble")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHUMBLE")
+  set(SOURCES "${SOURCES}" src/ros_param_backend_foxy.cpp)
 else()
   message(FATAL_ERROR "Unsupported ROS Distribution: " "$ENV{ROS_DISTRO}")
 endif()

On launch of the node, we get below error:

$ ros2 launch realsense2_camera rs_launch.py 
[INFO] [launch]: All log files can be found below /home/eiforamr/.ros/ros_log/2022-07-09-10-58-09-036872-demohost-109
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [realsense2_camera_node-1]: process started with pid [110]
[realsense2_camera_node-1] [INFO] [1657357089.768480259] [camera.camera]: RealSense ROS v4.0.4
[realsense2_camera_node-1] [INFO] [1657357089.768578837] [camera.camera]: Built with LibRealSense v2.50.0
[realsense2_camera_node-1] [INFO] [1657357089.768600116] [camera.camera]: Running with LibRealSense v2.50.0
[realsense2_camera_node-1] [INFO] [1657357089.842162413] [camera.camera]: Device with serial number 044322073299 was found.
[realsense2_camera_node-1] 
[realsense2_camera_node-1] [INFO] [1657357089.842220304] [camera.camera]: Device with physical ID /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0/video4linux/video0 was found.
[realsense2_camera_node-1] [INFO] [1657357089.842235453] [camera.camera]: Device with name Intel RealSense D435I was found.
[realsense2_camera_node-1] [INFO] [1657357089.842389614] [camera.camera]: Device with port number 2-3 was found.
[realsense2_camera_node-1] [INFO] [1657357089.842407956] [camera.camera]: Device USB type: 3.2
[realsense2_camera_node-1] [INFO] [1657357089.848333463] [camera.camera]: getParameters...
[realsense2_camera_node-1] [INFO] [1657357089.849051888] [camera.camera]: JSON file is not provided
[realsense2_camera_node-1] [INFO] [1657357089.850315853] [camera.camera]: Device Name: Intel RealSense D435I
[realsense2_camera_node-1] [INFO] [1657357089.851342552] [camera.camera]: Device Serial No: 044322073299
[realsense2_camera_node-1] [INFO] [1657357089.851644524] [camera.camera]: Device physical port: /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0/video4linux/video0
[realsense2_camera_node-1] [INFO] [1657357089.852256396] [camera.camera]: Device FW version: 05.13.00.50
[realsense2_camera_node-1] [INFO] [1657357089.852528712] [camera.camera]: Device Product ID: 0x0B3A
[realsense2_camera_node-1] [INFO] [1657357089.852777950] [camera.camera]: Sync Mode: Off
[realsense2_camera_node-1] terminate called after throwing an instance of 'rclcpp::exceptions::InvalidParameterTypeException'
[realsense2_camera_node-1]   what():  parameter 'depth_module.auto_gain_limit_toggle' has invalid type: cannot undeclare an statically typed parameter
[ERROR] [realsense2_camera_node-1]: process has died [pid 110, exit code -6, cmd '/home/eiforamr/ros2_ws/install/realsense2_camera/lib/realsense2_camera/realsense2_camera_node --ros-args --log-level info --ros-args -r __node:=camera -r __ns:=/camera --params-file /tmp/launch_params_umzve47l'].

Do you know how to solve this issue?

aagrawa3-dev avatar Jul 09 '22 10:07 aagrawa3-dev

Thanks very much @aagrawa3-dev for your makefile patch for the beta wrapper! I have passed the details to the ROS2 wrapper development team. Official support for Humble in the ros2_beta wrapper is being worked on.

The launch error that you reported was previously experienced by a RealSense ROS user at https://github.com/IntelRealSense/realsense-ros/issues/2245 and they suggested setting a dynamic_typing flag as a fix.

In regard to missing udev rules, please try installing them with the instructions below.

sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger

MartyG-RealSense avatar Jul 09 '22 10:07 MartyG-RealSense

Hello there, using the dkms prebuild provided by @MartyG-RealSense and some tricky configurations, we were able to use the relasense-ros package (Ubuntu 22.04 and ROS2 Humble).

RUN apt-get update && apt-get install --no-install-recommends -y \
    libssl-dev  \
    libgl1-mesa-dev \
    libgtk-3-dev \
    libglfw3-dev \
    libglu1-mesa-dev \
    libusb-1.0-0-dev \
    pkg-config \
    python3 \
    python3-dev \
    python3-distutils \
    dkms \
    --reinstall \
    # Install realsense DKMS
    && wget -nc https://github.com/mengyui/librealsense2-dkms/releases/download/initial-support-for-kernel-5.15/librealsense2-dkms-dkms_1.3.14_amd64.deb \
    && dpkg -i librealsense2-dkms-dkms_1.3.14_amd64.deb \
    && rm librealsense2-dkms-dkms_1.3.14_amd64.deb \
    && wget -nc 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF6E65AC044F831AC80A06380C8B3A55A6F3EFCDE' -O librealsense.key \
    && gpg --no-default-keyring --keyring ./librealsense_keyring.gpg --import librealsense.key \
    && gpg --no-default-keyring --keyring ./librealsense_keyring.gpg --export > librealsense.gpg \
    && mv librealsense.gpg /etc/apt/trusted.gpg.d/ \
    && rm *.gpg \
    && cp /etc/apt/sources.list /etc/apt/sources.list.bkp \
    && echo "deb https://librealsense.intel.com/Debian/apt-repo focal main" >> /etc/apt/sources.list \
    # To install libssl1.1, and another dependencies
    && echo "deb http://archive.ubuntu.com/ubuntu focal universe" >> /etc/apt/sources.list \
    && echo "deb http://archive.ubuntu.com/ubuntu focal-updates universe" >> /etc/apt/sources.list \
    && echo "deb http://archive.ubuntu.com/ubuntu focal main restricted" >> /etc/apt/sources.list \
    && echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted" >> /etc/apt/sources.list \
    && echo "deb http://archive.ubuntu.com/ubuntu focal multiverse" >> /etc/apt/sources.list \
    && echo "deb http://archive.ubuntu.com/ubuntu focal-updates multiverse" >> /etc/apt/sources.list \
    && apt update && apt-get install -y \ 
    librealsense2-utils \
    librealsense2-dev \
    librealsense2-udev-rules \
    # Restore the Ubuntu Repositories Version
    && rm /etc/apt/sources.list \
    && mv /etc/apt/sources.list.bkp /etc/apt/sources.list \
    # ------------------------------
    && apt autoremove && apt clean -y \ 
    && rm -rf /var/lib/apt/lists/*

dadaroce avatar Jul 12 '22 21:07 dadaroce

Thanks so much @dadaroce for sharing the news of your success and the details of your procedure!

MartyG-RealSense avatar Jul 12 '22 21:07 MartyG-RealSense

Update: Building from source the RS camera ROS2 wrapper now support Humble distro (See PR: https://github.com/IntelRealSense/realsense-ros/pull/2406)

Kernel patched for 5.15 is not included, so the support is currently without full metadata.

Still on the roadmap:

  • Jammy Debians
  • Kernel patches for 5.15

Nir-Az avatar Jul 17 '22 18:07 Nir-Az

Update: Building from source the RS camera ROS2 wrapper now support Humble distro (See PR: IntelRealSense/realsense-ros#2406)

Kernel patched for 5.15 is not included, so the support is currently without full metadata.

Still on the roadmap:

* Jammy Debians

* Kernel patches for 5.15

Hi @Nir-Az Thanks for info. But this patch is merged to branch "IntelRealSense:ros2-beta" !!

Is this branch going to be main branch for humble upgrade? When is it planned to merge to development branch?

aagrawa3-dev avatar Jul 17 '22 21:07 aagrawa3-dev

Hi @aagrawa3-dev ,

I know it might be confusing but I will try to clarify the realsense-ros repo branches, We develop/maintain ROS1 + ROS2 on this repo, on different branches. If you notice on the development branch readme, it said that this is the ROS1 branch.

This version supports Kinetic, Melodic and Noetic distributions.

For running in ROS2 environment please switch to the [ros2 branch](https://github.com/IntelRealSense/realsense-ros/tree/ros2-beta).

The ROS2 branch is ros2-beta Meaning only ros2-beta branch can support ROS2-Humble as ROS1 latest support is Noetic distro.

Hope it helps..

Nir-Az avatar Jul 18 '22 05:07 Nir-Az

Try to build from source.

sudo apt install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev libusb-1.0-0-dev
mkdir -p ~/repos && cd ~/repos
git clone https://github.com/IntelRealSense/librealsense
mkdir -p librealsense/build && cd librealsense/build
cmake .. -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release
make -j$(nproc)
sudo make install

bikcrum avatar Jul 26 '22 07:07 bikcrum

I am unable to compile it on 22.04. here is a way to reproduce my error with commit https://github.com/IntelRealSense/librealsense/commit/1b9a40da35f20a46b2113cabd920ce37f757743b

Dockerfile:

FROM ubuntu:22.04
RUN apt update && apt install -y libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev libusb-1.0-0-dev git build-essential cmake libssl-dev
RUN mkdir -p ~/repos && cd ~/repos
RUN git clone https://github.com/IntelRealSense/librealsense
RUN mkdir -p librealsense/build
WORKDIR /librealsense/build
RUN cmake ..
RUN make &&  make install

error:

#12 778.6 [ 35%] Building CXX object CMakeFiles/realsense2.dir/src/libusb/context-libusb.cpp.o
#12 778.7 In file included from /librealsense/src/libusb/context-libusb.h:10,
#12 778.7                  from /librealsense/src/libusb/context-libusb.cpp:4:
#12 778.7 /librealsense/src/libusb/libusb.h:10:82: error: extended character ‘ is not valid in an identifier
#12 778.7    10 | /usr/include/libusb-1.0/libusb.h:736:4: warning: ISO C++ forbids zero-size array ‘dev_capability_data’ [-Wpedantic]
#12 778.7       |                                                                                  ^
#12 778.7 /librealsense/src/libusb/libusb.h:10:82: error: extended character ’ is not valid in an identifier
#12 778.7 /librealsense/src/libusb/libusb.h:13:82: error: extended character ‘ is not valid in an identifier
#12 778.7    13 | /usr/include/libusb-1.0/libusb.h:767:4: warning: ISO C++ forbids zero-size array ‘dev_capability’ [-Wpedantic]
#12 778.7       |                                                                                  ^
#12 778.7 /librealsense/src/libusb/libusb.h:13:82: error: extended character ’ is not valid in an identifier
#12 778.7 /librealsense/src/libusb/libusb.h:18:83: error: extended character ‘ is not valid in an identifier
#12 778.7    18 | /usr/include/libusb-1.0/libusb.h:1260:4: warning: ISO C++ forbids zero-size array ‘iso_packet_desc’ [-Wpedantic]
#12 778.7       |                                                                                   ^
#12 778.7 /librealsense/src/libusb/libusb.h:18:83: error: extended character ’ is not valid in an identifier
#12 780.2 make[2]: *** [CMakeFiles/realsense2.dir/build.make:1280: CMakeFiles/realsense2.dir/src/libusb/context-libusb.cpp.o] Error 1
#12 780.2 make[1]: *** [CMakeFiles/Makefile2:916: CMakeFiles/realsense2.dir/all] Error 2
#12 780.2 make: *** [Makefile:136: all] Error 2

works fine in: https://github.com/IntelRealSense/librealsense/tree/v2.50.0

AustinDeric avatar Sep 04 '22 22:09 AustinDeric

Hi @AustinDeric ,

This error is raised when building with GCC >= 10 Thanks to @chris-durand a fix PR was merged into development branch yesterday (@MartyG-RealSense FYI). To get it, retry running the docker image but before adjust your docker file to use development branch

Change this:

RUN git clone https://github.com/IntelRealSense/librealsense

to this:

RUN git clone -b development https://github.com/IntelRealSense/librealsense

Good luck!

Nir-Az avatar Sep 05 '22 07:09 Nir-Az

Thanks very much @Nir-Az for the FYI :)

MartyG-RealSense avatar Sep 05 '22 13:09 MartyG-RealSense

I was able to use a realsense device on Ubuntu 22 via docker with this Dockerfile:

FROM python:3.7.4

WORKDIR /home

ENV DEBIAN_FRONTEND=noninteractive 
ENV TZ=Europe/Minsk

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && apt-get install -y \ 
    sudo \ 
    cmake \
    git \
    curl \
    libopencv-dev \ 
    libjpeg-dev \ 
    libpng-dev \ 
    libtiff-dev \  
    libgtk2.0-dev \ 
    python-numpy \ 
    python-pycurl \ 
    keyboard-configuration \
    libgl1-mesa-dev \
    libglu1-mesa-dev \
    libusb-1.0-0-dev \
    libglfw3-dev \
    freeglut3 \
    at \
    freeglut3-dev \
    nano \
    curl \
    libglfw3-dev \
    libgl1-mesa-dev \
    libglu1-mesa-dev \
    at \ 
    udev \
    linux-headers-* \
    libusb-1.0-0-dev 

#update cmake
RUN sudo apt remove cmake -y && \
    wget https://github.com/Kitware/CMake/releases/download/v3.23.0/cmake-3.23.0.tar.gz && \
    tar -xf cmake-3.23.0.tar.gz && \
    cd cmake-3.23.0 && \
    ./configure && \
    make -j$(nproc)  && \
    sudo make install -j$(nproc) 


#install realsense
RUN git clone https://github.com/IntelRealSense/librealsense && \
    cd librealsense && \
    git checkout v2.51.1 && \
    mkdir -p /etc/udev/rules.d && \
    mkdir build && cd build && \
    cmake .. && \
    make install -j$(nproc) && \
    make -j$(nproc)  

executing on host (if you need any GUI application like realsense-viewer or cv2.imshow ):

export DISPLAY=:1
xhost + 

(maybe you will need to use DISPLAY=:0 depending on your display index)

and then:

sudo docker run -it --privileged -v /etc/udev/*:/etc/udev/* \
    -v /dev/bus/usb:/dev/bus/usb \
    -v /dev/:/dev/ \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e DISPLAY=$DISPLAY -h $HOSTNAME -v $HOME/.Xauthority:/home/.Xauthority realsense:latest bash

image

even though my application is for computer vision and I don't need to be compatible with ROS, this can be of help

GuintherKovalski avatar Sep 07 '22 14:09 GuintherKovalski

Thanks so much @GuintherKovalski for sharing! :)

MartyG-RealSense avatar Sep 07 '22 15:09 MartyG-RealSense

Dear @GuintherKovalski, thank you for your contribution.

I'm running into an issue with reproducing the dockerfile as you have added a wildcardlinux-headers-* I doubt this is intended? Could you specify which ones we need? Adding all of them costs:

After this operation, 67,0 GB of additional disk space will be used.
Do you want to continue? [Y/n] 

RUN apt-get update && apt-get install -y \ sudo \ cmake
git
curl
libopencv-dev \ libjpeg-dev \ libpng-dev \ libtiff-dev \
libgtk2.0-dev \ python-numpy \ python-pycurl \ keyboard-configuration
libgl1-mesa-dev
libglu1-mesa-dev
libusb-1.0-0-dev
libglfw3-dev
freeglut3
at
freeglut3-dev
nano
curl
libglfw3-dev
libgl1-mesa-dev
libglu1-mesa-dev
at \ udev
linux-headers-*
libusb-1.0-0-dev

dHofmeister avatar Oct 14 '22 11:10 dHofmeister

I built a different version. It compiles ROS2 + Ubuntu 22 + Realsense and it's working.

Source files / Reference files: https://github.com/mengyui/librealsense2-dkms/commit/15562dc0a501a4aa67e087f579c69a0ecc85f621 https://github.com/mengyui/librealsense2-dkms/releases/tag/initial-support-for-kernel-5.15

FROM ros:humble-ros-core-jammy

# https://github.com/mengyui/librealsense2-dkms/commit/15562dc0a501a4aa67e087f579c69a0ecc85f621
# https://github.com/mengyui/librealsense2-dkms/releases/tag/initial-support-for-kernel-5.15

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    wget \
    dkms \
    git \
    libusb-1.0-0-dev \
    libudev-dev \
    libglfw3-dev \
    pkg-config \
    libgtk-3-dev \
    at \
    unzip \
    libpopt0 \
    rsync \
    libglu1 \
    libglu1-mesa \
    python3-colcon-common-extensions \
    python3-rosdep \
    build-essential \
    nano \
    usbutils \
    && rm -rf /var/lib/apt/lists/*

RUN mkdir -p /invisible/src
WORKDIR /invisible

COPY realsense /invisible/src/realsense

RUN cd /invisible/src/realsense && \
    dpkg -i librealsense2-dkms-dkms_1.3.14_amd64.deb && \
    dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb && \
    dpkg -i librealsense2-udev-rules_2.50.0-0~realsense0.6128_amd64.deb && \
    dpkg -i librealsense2_2.50.0-0~realsense0.6128_amd64.deb && \
    dpkg -i librealsense2-gl_2.50.0-0~realsense0.6128_amd64.deb && \
    dpkg -i librealsense2-net_2.50.0-0~realsense0.6128_amd64.deb && \
    dpkg -i librealsense2-utils_2.50.0-0~realsense0.6128_amd64.deb && \
    dpkg -i librealsense2-dev_2.50.0-0~realsense0.6128_amd64.deb

RUN rosdep init && \
    rosdep update

RUN apt-get update  && \
    rosdep install -i --from-path src --rosdistro $ROS_DISTRO --skip-keys=librealsense2 -y

RUN . /opt/ros/$ROS_DISTRO/setup.sh && colcon build

CMD ["sleep", "infinity"]

There is one COPY realsense /invisible/src/realsense argument.

This folder contains a raw copy-paste of the github repository: git clone https://github.com/IntelRealSense/realsense-ros.git -b ros2-beta

and all the unpacked .deb files from https://github.com/mengyui/librealsense2-dkms/releases/tag/initial-support-for-kernel-5.15

I had to go this route with cloning the repo because there is a compile-time error. The github repo searches for:

find_package(realsense2 2.51.1)
if(NOT realsense2_FOUND)
    message(FATAL_ERROR "\n\n Intel RealSense SDK 2.0 is missing, please install it from https://github.com/IntelRealSense/librealsense/releases\n\n")
endif()

There is a versioning mismatch somewhere which I couldnt trace. But removing the release version requirement makes it build and run.

find_package(realsense2)
if(NOT realsense2_FOUND)
    message(FATAL_ERROR "\n\n Intel RealSense SDK 2.0 is missing, please install it from https://github.com/IntelRealSense/librealsense/releases\n\n")
endif()

cheers

dHofmeister avatar Oct 14 '22 15:10 dHofmeister

Hi, is there any plan or work in progress that try to resolve the build error of arm64 build in ros humble? https://build.ros2.org/job/Hsrc_uJ__librealsense2__ubuntu_jammy__source/

Benjamin-Tan avatar Oct 17 '22 02:10 Benjamin-Tan