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

ros wrapper installation is failing on ubuntu 22 #3051

Closed
alonsnir opened this issue Mar 19, 2024 · 18 comments
Closed

ros wrapper installation is failing on ubuntu 22 #3051

alonsnir opened this issue Mar 19, 2024 · 18 comments
Labels

Comments

@alonsnir
Copy link

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model D435
Firmware Version 5.14.0
Operating System & Version Linux (Ubuntu 22)
Kernel Version (Linux Only) 5.15.0-43-generic
Platform PC
Librealsense SDK Version modinfo uvcvideo grep "version:" version: 1.1.1-realsense-1.3.24 srcversion: 762B0408ACF11F959293A92
Language python
Segment Robot
ROS Distro Humble
RealSense ROS Wrapper Version cannot get it installed with sudo apt install ros-humble-realsense2-*

Issue Description

cannot get the ROS2 wrapper to be installed on a new system

Installed 22.04.1 and then changed kernel to 5.15.0-43-generic due to the Reasense SDK requirements

cat /etc/apt/sources.list.d/ros-latest.list
deb http://packages.ros.org/ros/ubuntu jammy main
sudo apt install ros-humble-realsense2-*
.........
Get:179 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-xacro amd64 2.0.8-1jammy.20240217.032951 [36.8 kB]
Ign:180 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-realsense2-description amd64 4.54.1-1jammy.20240217.081213
Ign:177 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-realsense2-camera-dbgsym amd64 4.54.1-1jammy.20240217.085916
Ign:180 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-realsense2-description amd64 4.54.1-1jammy.20240217.081213
Ign:177 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-realsense2-camera-dbgsym amd64 4.54.1-1jammy.20240217.085916
Ign:180 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-realsense2-description amd64 4.54.1-1jammy.20240217.081213
Err:177 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-realsense2-camera-dbgsym amd64 4.54.1-1jammy.20240217.085916
  Connection failed [IP: 64.50.236.52 80]
Err:180 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-realsense2-description amd64 4.54.1-1jammy.20240217.081213
  Connection failed [IP: 64.50.236.52 80]
Fetched 143 MB in 8min 28s (281 kB/s)
E: Failed to fetch http://packages.ros.org/ros2/ubuntu/pool/main/r/ros-humble-realsense2-camera/ros-humble-realsense2-camera-dbgsym_4.54.1-1jammy.20240217.085916_amd64.deb  Connection failed [IP: 64.50.236.52 80]
E: Failed to fetch http://packages.ros.org/ros2/ubuntu/pool/main/r/ros-humble-realsense2-description/ros-humble-realsense2-description_4.54.1-1jammy.20240217.081213_amd64.deb  Connection failed [IP: 64.50.236.52 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I'm stuck on it a few days already, any help would be much appreciated

@MartyG-RealSense
Copy link
Collaborator

Hi @alonsnir Before installing the RealSense ROS2 wrapper with sudo apt install ros-humble-realsense2-* did you first install the librealsense SDK using the instruction below, please (which uses 'librealsense2' instead of the wrapper's 'realsense2').

sudo apt install ros-humble-librealsense2*

@alonsnir
Copy link
Author

Hi @MartyG-RealSense I have followed the installation instructions step by step

  1. Install the ROS2 distribution - humble
  2. Install latest Intel® RealSense™ SDK 2.0 - install from Linux Debian Installation Guide
  3. Install Intel® RealSense™ ROS2 wrapper
    Option 1: Install debian package from ROS servers

@MartyG-RealSense
Copy link
Collaborator

Thanks very much for the information. If you installed the SDK with the distribution_linux instructions then your SDK version is likely to be 2.54.2. If your SDK is 2.54.2 then the firmware version that should be used with it is 5.15.1.0 rather than the 5.14.0.0 version (which is designed for use with 2.53.1). This is unlikely to be the cause of your wrapper installation problem though.

Can you confirm if you configured your Ubuntu repositories using the instructions at https://wiki.ros.org/Installation/Ubuntu/Sources before you used the sudo apt install ros-humble-realsense2-* installation instruction, please?

@alonsnir
Copy link
Author

I have configured it as https://wiki.ros.org/Installation/Ubuntu/Sources

Here is the result of it:

cat /etc/apt/sources.list.d/ros-latest.list
deb http://packages.ros.org/ros/ubuntu jammy main

@MartyG-RealSense
Copy link
Collaborator

And you are installing on a PC such as a laptop or desktop and not a computer board such as Nvidia Jetson?

@alonsnir
Copy link
Author

It's Intel SoC. Details here https://www.aaeon.com/en/p/subcompact-boards-gene-adp6

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 19, 2024

SDK installation problems are more likely to occur on computing devices with an 'exotic' hardware / software configuration, such as industrial boards. In this situation, building librealsense from source code with the libuvc backend or RSUSB backend installation methods can often resolve these problems. This is because these installation types are not dependent on Linux versions or kernel versions and do not require kernel patching.

A quick and easy way to perform a libuvc installation is by using a build script with an installation procedure at the link below.

https://github.com/IntelRealSense/librealsense/blob/master/doc/libuvc_installation.md

@alonsnir
Copy link
Author

I will give it a try and get back with results.
Regarding this, does it mean I can ignore the realsense sdk requirement for a specific kernel and go with the default one delivered by the regular Ubuntu 22.04 install?

@MartyG-RealSense
Copy link
Collaborator

Yes, if you use the libuvc or RSUSB backend then you can use the default kernel as librealsense will not need to rely on the kernel.

@alonsnir
Copy link
Author

@MartyG-RealSense before I go with the libuvc method, just to clarify that the librealsense install went well. Could you please explain how this will help with the ros wrapper installation?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 19, 2024

If your current librealsense installation is working fine then stick with that instead of using libuvc.

Considering that you reported Connection failed errors when trying to install the wrapper from Debian packages on the ROS server, you could consider whether there is an internet connectivity problem with downloading the packages from IP address 64.50.236.52 80. This could be due to a firewall or proxy on your computer or a network that the computer is on.

You could test for the possibility of a firewall or proxy block on your computer by attempting to build the wrapper from source code instead.

@alonsnir
Copy link
Author

@MartyG-RealSense here I have attempted to build from source, and even I have the SDK installed (from the debain packages)

~/ros2_ws$ colcon build
Starting >>> realsense2_camera_msgs
Finished <<< realsense2_camera_msgs [3.74s]                     
Starting >>> realsense2_camera
Starting >>> realsense2_description
Finished <<< realsense2_description [0.45s]                                                             
--- stderr: realsense2_camera                         
CMake Warning at CMakeLists.txt:119 (find_package):
  By not providing "Findrealsense2.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "realsense2", but CMake did not find one.

  Could not find a package configuration file provided by "realsense2"
  (requested version 2.54.1) with any of the following names:

    realsense2Config.cmake
    realsense2-config.cmake

  Add the installation prefix of "realsense2" to CMAKE_PREFIX_PATH or set
  "realsense2_DIR" to a directory containing one of the above files.  If
  "realsense2" provides a separate development package or SDK, be sure it has
  been installed.

CMake Error at CMakeLists.txt:124 (message):

   Intel RealSense SDK 2.0 is missing, please install it from https://github.com/IntelRealSense/librealsense/releases

---
Failed   <<< realsense2_camera [1.31s, exited with code 1]

Summary: 2 packages finished [5.21s]
  1 package failed: realsense2_camera
  1 package had stderr output: realsense2_camera

so I guess building the wrapper from sources requires building the librealsense in a same manner, which I did and now the system is up and running.

Thank you

@alonsnir
Copy link
Author

@MartyG-RealSense I have a related question please. Why are node names are differ between what I have installed from the ubuntu packages and the one build from sources?

built from sources, note the version

~$ ros2 run realsense2_camera realsense2_camera_node
[INFO] [1711007775.084144083] [camera.camera]: RealSense ROS v4.54.1
[INFO] [1711007775.084229028] [camera.camera]: Built with LibRealSense v2.54.2
[INFO] [1711007775.084235330] [camera.camera]: Running with LibRealSense v2.54.2
$ ros2 node list
/camera/camera

ros2 topic list
/camera/camera/color/camera_info
/camera/camera/color/image_raw
..............

Installed from packages

$ ros2 run realsense2_camera realsense2_camera_node
[INFO] [1711007453.627304683] [camera]: RealSense ROS v4.54.1
[INFO] [1711007453.627558324] [camera]: Built with LibRealSense v2.54.1
[INFO] [1711007453.627610465] [camera]: Running with LibRealSense v2.54.1
$ ros2 node list
/camera

ros2 topic list
/color/camera_info
/color/image_raw
...........

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 21, 2024

The packages installed from the ROS server will be based on what the best librealsense and ROS wrapper version matches were at the time that the packages were created. Whilst librealsense 2.54.2 works with wrapper 4.54.1, this SDK version did not exist at the time that the packages were created. So officially the recommended match for wrapper 4.54.1 is still librealsense 2.54.1.

image

However, since 2.54.2 was mostly bug-fixes rather than new features, it will still work fine with wrapper 4.54.1 if you install librealsense from source code or non-ROS packages.

@MartyG-RealSense
Copy link
Collaborator

Hi @alonsnir Do you require further assistance with this case, please? Thanks!

@alonsnir
Copy link
Author

@MartyG-RealSense I have a related question please. Why are node names are differ between what I have installed from the ubuntu packages and the one build from sources?

built from sources, note the version

~$ ros2 run realsense2_camera realsense2_camera_node
[INFO] [1711007775.084144083] [camera.camera]: RealSense ROS v4.54.1
[INFO] [1711007775.084229028] [camera.camera]: Built with LibRealSense v2.54.2
[INFO] [1711007775.084235330] [camera.camera]: Running with LibRealSense v2.54.2
$ ros2 node list
/camera/camera

ros2 topic list
/camera/camera/color/camera_info
/camera/camera/color/image_raw
..............

Installed from packages

$ ros2 run realsense2_camera realsense2_camera_node
[INFO] [1711007453.627304683] [camera]: RealSense ROS v4.54.1
[INFO] [1711007453.627558324] [camera]: Built with LibRealSense v2.54.1
[INFO] [1711007453.627610465] [camera]: Running with LibRealSense v2.54.1
$ ros2 node list
/camera

ros2 topic list
/color/camera_info
/color/image_raw
...........

I have resolved this by remapping, so nodes run on dev machine (deb packages) vs target machine (build from sources) will refer same topics (e.g. /camera/camera/color/image_raw) and still the question is puzzling

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 27, 2024

I believe that the discrepancy may be because a change to camera naming - #2857 - was merged into the ROS2 wrapper's source code on August 29 2023. But that change would not be in the package version of the 4.54.1 wrapper, as the package version was released on June 27 2023.

The package version of the 4.54.1 will date from its original publishing date of 27 June 2023, but numerous changes have been added to the source code version since then. The package version will be updated when the next ROS wrapper version is published.

The camera_name feature is described in the wrapper documentation links below.

https://github.com/IntelRealSense/realsense-ros?tab=readme-ov-file#camera-name-and-camera-namespace

https://dev.intelrealsense.com/docs/ros2-wrapper#camera-namespace-and-camera-name

@alonsnir
Copy link
Author

@MartyG-RealSense thanks for clarifying
Cheers

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

No branches or pull requests

2 participants