IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.58k stars 4.82k forks source link

Release to Ubuntu 22.4 / jammy #10439

Closed doisyg closed 1 year ago

doisyg commented 2 years ago

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 ?

MartyG-RealSense commented 2 years ago

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

doisyg commented 2 years ago

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

MartyG-RealSense commented 2 years ago

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

dheera commented 2 years ago

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.

doisyg commented 2 years ago

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 commented 2 years ago

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.

MartyG-RealSense commented 2 years ago

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

SteveMacenski commented 2 years ago

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?

smorillon commented 2 years ago

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?

davetcoleman commented 2 years ago

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.

Nir-Az commented 2 years ago

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

pepisg commented 2 years ago

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 :(

doisyg commented 2 years ago

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.

mengyui commented 2 years ago

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.

aagrawa3-dev commented 2 years ago

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?

MartyG-RealSense commented 2 years ago

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
dadaroce commented 2 years ago

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/*
MartyG-RealSense commented 2 years ago

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

Nir-Az commented 2 years ago

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:

aagrawa3-dev commented 2 years ago

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?

Nir-Az commented 2 years ago

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..

bikcrum commented 2 years ago

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
AustinDeric commented 2 years ago

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

Nir-Az commented 2 years ago

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!

MartyG-RealSense commented 2 years ago

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

GuintherKovalski commented 2 years ago

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

MartyG-RealSense commented 2 years ago

Thanks so much @GuintherKovalski for sharing! :)

dHofmeister commented 2 years ago

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 commented 2 years ago

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

Benjamin-Tan commented 2 years ago

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/

Nir-Az commented 2 years ago

Hi @Benjamin-Tan, We have released an initial release to ROS2 Humble.

This release builds as expected at all x86 environments foxy/galactic/humble and also works at arm64 for foxy & galactic. Somehow the arm64 build at the buildfarm fails. We are trying for quiet some time now to fix it and we still havn't found why it happens. We did check building it on an arm64 machine and it works. Something about the Humble arm64 buildfarm cause it to fail and we still don't know what.

If you have some idea's about what is special about that build against foxy/galactic builds please share 😀

Benjamin-Tan commented 2 years ago

Hi @Nir-Az, thanks for the information and i just manage to see your ROS Discourse post.

Hi @tfoote, thanks for the help last time on the advice for humble release for pinocchio package. Would you happen to know what might cause this issue of librealsense failing on Humble arm64 build farm as detailed in the ROS Discourse post?

tfoote commented 2 years ago

Likely there's a library with different content between the two builds. I would look on a working platform where you can find the missing symbols (find the appropriate .so file and then see if the symbols are in the libraries on the humble arm64 builds or if they are present see why those libraries aren't being linked on that build.

Nir-Az commented 2 years ago

The library that the librealsense2 link complains about is our internal library called fw / fwlib. We build on several OSs and several platform and never saw this issue. I tried running the build farm locally (It took a whole day.. why does it compile with -j1??) and it reproduced.. but when the build fails the container is automatically removed.. We will keep investigating it..

jyue86 commented 1 year ago

I wasn't sure if this is related. When trying to add the repository on 22.04, I get this error: image

I'm following the installation instructions from here. If my issue is related to the one here, I didn't see many people talking about the repo not being signed for jammy?

MartyG-RealSense commented 1 year ago

Hi @justinyue1643 The librealsense SDK does not yet officially support Ubuntu 22.04 Jammy. An unofficial test patch and pre-built package is available at https://github.com/IntelRealSense/librealsense/issues/10439#issuecomment-1171965106

sheaffej commented 1 year ago

@dHofmeister thank you very much for sharing your Dockerfile in https://github.com/IntelRealSense/librealsense/issues/10439#issuecomment-1279130578

It worked for me also, and I was able to build the image on an Intel NUC8 running Ubuntu 18.04 on the host, and Docker server 20.10.20 (Note: I had to upgrade Docker to 20.10.x to solve some apt-get update errors with Ubuntu 22.04).

I also converted your COPY statement into the steps you describe, adding a sed to modify the CMakeLists.txt file as you describe. This worked well for me!

# COPY realsense /invisible/src/realsense
RUN cd /invisible/src/realsense && \
    git clone https://github.com/IntelRealSense/realsense-ros.git -b ros2-beta && \
    wget https://github.com/mengyui/librealsense2-dkms/releases/download/initial-support-for-kernel-5.15/librealsense2-dkms-dkms_1.3.14_amd64.deb && \
    wget https://github.com/mengyui/librealsense2-dkms/releases/download/initial-support-for-kernel-5.15/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb && \
    wget https://github.com/mengyui/librealsense2-dkms/releases/download/initial-support-for-kernel-5.15/PREBUILT-DEB-PACKAGE-librealsense2_2.50.0-0.realsense0.6128_amd64.zip && \
    unzip PREBUILT-DEB-PACKAGE-librealsense2_2.50.0-0.realsense0.6128_amd64.zip && \
    rm -f PREBUILT-DEB-PACKAGE-librealsense2_2.50.0-0.realsense0.6128_amd64.zip && \
    cd realsense-ros/realsense2_camera && \
    sed -i 's/find_package(realsense2 2.51.1)/find_package(realsense2)/' CMakeLists.txt

Thank you again!

Nir-Az commented 1 year ago

@tfoote / @Benjamin-Tan Hi, Can you please take a look on our recent finding about a difference at the build process of Humble on buildfarm? https://discourse.ros.org/t/humble-build-farm-job-on-arm-fails-on-first-release/27413/4?u=nir-az

Any idea about this compiler flags that were added?

tfoote commented 1 year ago

I found this reference where link time optimization support was added to dpkg-buildpackage: https://wiki.debian.org/ToolChain/LTO "Starting with dpkg 1.21.0, dpkg-buildflags introduced a new optimization area, which adds the necessary flags to enable LTO."

And OpenSUSE enabled it by default in 2019: https://www.phoronix.com/news/GCC-9-LTO-Tumbleweed-Firefox I can't find an announcement of Debian doing the same, but I assume they followed suit. Ubuntu's statement here is that it's enabled for basically all architectures now. https://wiki.ubuntu.com/ToolChain/LTO

You could override the LTO settings of the build by patching the debian rules file template in the release repository. But the cleaning and stripping unreferenced content is generally helpful to avoid system bloat. These sorts of optimizations have been great at allowing our number of packages to grow, but the installation size to shrink so I'd strongly prefer to find a way to reference them properly so they don't get stripped rather than just disable the cleanup.

Nir-Az commented 1 year ago

@tfoote thanks, We currently overcome it by forcing no-lto or the problematic library build. IMO LTO is wrong on his decision for cropping this functions as they are in use. I confirm that Ubuntu 22 Debian build added the lto flag and not the build farm (it was hard to catch that)

I will look at the patch you suggested if we have another issue with this library cause we cannot spend this amount of time investigating issues that do not interrupting the native build..

Thanks

MartyG-RealSense commented 1 year ago

Hi everyone,

Version 2.53.1 of the librealsense SDK has been released, featuring support for Ubuntu 2020 kernels 5.13 and 5.15, and Ubuntu 2022 with kernel 5.15.

https://github.com/IntelRealSense/librealsense/releases/tag/v2.53.1

The SDK installation instruction pages have been updated to reflect this new support.

Package build https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md

Source code build https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md

tonynajjar commented 1 year ago

Hi everyone,

Version 2.53.1 of the librealsense SDK has been released, featuring support for Ubuntu 2020 kernels 5.13 and 5.15, and Ubuntu 2022 with kernel 5.15.

https://github.com/IntelRealSense/librealsense/releases/tag/v2.53.1

The SDK installation instruction pages have been updated to reflect this new support.

Package build https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md

Source code build https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md

Thanks for the update @MartyG-RealSense, where can I find realsense firmware 5.14.0.0 recommended for SDK v2.53.1? It's not here

MartyG-RealSense commented 1 year ago

Hi @tonynajjar Updating of the firmware release archive page sometimes lags slightly behind the release date of a new SDK version.

In the meantime, if you install SDK 2.53.1 and launch its RealSense Viewer tool then it should have a pop-up panel that prompts to install the recommended firmware for 2.53.1. The recommended firmware for a particular SDK version is bundled with it.

image

MartyG-RealSense commented 1 year ago

Hi again @tonynajjar Firmware 5.14.0.0 is now available on the firmware archive page. Thanks very much for your patience!

https://dev.intelrealsense.com/docs/firmware-releases#d400-series-firmware-downloads

MartyG-RealSense commented 1 year ago

As support for Ubuntu 2020 kernels 5.13 and 5.15, and Ubuntu 2022 with kernel 5.15 was released in SDK 2.53.1, does anyone require further support with this issue please? Thanks!

MartyG-RealSense commented 1 year ago

Case closed due to kernel 5.13 and 5.15 support implemented in SDK version 2.53.1 and no further comments received after 2 weeks.