Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release to Ubuntu 22.4 / jammy #10439

Closed
doisyg opened this issue Apr 23, 2022 · 46 comments
Closed

Release to Ubuntu 22.4 / jammy #10439

doisyg opened this issue Apr 23, 2022 · 46 comments

Comments

@doisyg
Copy link

doisyg commented Apr 23, 2022

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
Copy link
Collaborator

MartyG-RealSense commented Apr 23, 2022

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
Copy link
Author

doisyg commented May 4, 2022

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
Copy link
Collaborator

MartyG-RealSense commented May 4, 2022

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

@dheera
Copy link

dheera commented May 6, 2022

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
Copy link
Author

doisyg commented May 19, 2022

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
Copy link
Author

doisyg commented May 19, 2022

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: ros-navigation/navigation2#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
Copy link
Collaborator

MartyG-RealSense commented May 19, 2022

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
Copy link

SteveMacenski commented May 19, 2022

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
Copy link

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
Copy link

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
Copy link
Collaborator

Nir-Az commented Jun 29, 2022

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

@pepisg
Copy link

pepisg commented Jun 30, 2022

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
Copy link
Author

doisyg commented Jun 30, 2022

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
Copy link
Contributor

mengyui commented Jul 1, 2022

There is a draft kernel patch in the PR #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
Copy link

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
Copy link
Collaborator

MartyG-RealSense commented Jul 9, 2022

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 IntelRealSense/realsense-ros#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
Copy link

dadaroce commented Jul 12, 2022

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
Copy link
Collaborator

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

@Nir-Az
Copy link
Collaborator

Nir-Az commented Jul 17, 2022

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

@aagrawa3-dev
Copy link

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
Copy link
Collaborator

Nir-Az commented Jul 18, 2022

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

@Benjamin-Tan
Copy link

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
Copy link
Collaborator

Nir-Az commented Oct 17, 2022

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
Copy link

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
Copy link

tfoote commented Oct 18, 2022

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
Copy link
Collaborator

Nir-Az commented Oct 18, 2022

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
Copy link

jyue86 commented Oct 24, 2022

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
Copy link
Collaborator

MartyG-RealSense commented Oct 24, 2022

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 #10439 (comment)

@sheaffej
Copy link

@dHofmeister thank you very much for sharing your Dockerfile in #10439 (comment)

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
Copy link
Collaborator

Nir-Az commented Oct 25, 2022

@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
Copy link

tfoote commented Nov 23, 2022

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
Copy link
Collaborator

Nir-Az commented Nov 23, 2022

@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
Copy link
Collaborator

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
Copy link

tonynajjar commented Dec 7, 2022

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
Copy link
Collaborator

MartyG-RealSense commented Dec 7, 2022

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests